|
@ -42,46 +42,89 @@ namespace SCP.Views.BasicData |
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
_entity.CH = Request["CH"]; |
|
|
_entity.CH = Request["CH"]; |
|
|
_entity.EN = Request["EN"]; |
|
|
_entity.EN = Request["EN"]; |
|
|
|
|
|
_entity.GUID = Request["GUID"]; |
|
|
TXT_CH.Text = _entity.CH; |
|
|
TXT_CH.Text = _entity.CH; |
|
|
TXT_EN.Text = _entity.EN; |
|
|
TXT_EN.Text = _entity.EN; |
|
|
var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(_entity); |
|
|
TXT_GUID.Text = _entity.GUID; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void Btn_Save_Click(object sender, EventArgs e) |
|
|
protected void Btn_Save_Click(object sender, EventArgs e) |
|
|
{ |
|
|
{ |
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
|
|
|
_entity.GUID = Guid.NewGuid().ToString("N").ToUpper(); |
|
|
|
|
|
_entity.CH = TXT_CH.Text; |
|
|
|
|
|
_entity.EN = TXT_EN.Text; |
|
|
|
|
|
_entity.RU = TXT_RU.Text; |
|
|
|
|
|
_entity.DE = TXT_DE.Text; |
|
|
|
|
|
_entity.FR = TXT_FR.Text; |
|
|
|
|
|
_entity.AR = TXT_AR.Text; |
|
|
|
|
|
_entity.JP = TXT_JP.Text; |
|
|
|
|
|
var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text, EN = TXT_EN.Text }); |
|
|
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
if (ret.Result.Count > 0) |
|
|
if (!string.IsNullOrEmpty(Request["CH"])) |
|
|
{ |
|
|
{ |
|
|
Alert.ShowInTop("中文名称重复!"); |
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
return; |
|
|
_entity.GUID = Request["GUID"]; |
|
|
} |
|
|
_entity.CH = TXT_CH.Text; |
|
|
else |
|
|
_entity.EN = TXT_EN.Text; |
|
|
{ |
|
|
_entity.RU = TXT_RU.Text; |
|
|
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity }); |
|
|
_entity.DE = TXT_DE.Text; |
|
|
if (ret1.State == ReturnStatus.Succeed) |
|
|
_entity.FR = TXT_FR.Text; |
|
|
|
|
|
_entity.AR = TXT_AR.Text; |
|
|
|
|
|
_entity.JP = TXT_JP.Text; |
|
|
|
|
|
TXT_GUID.Text = _entity.GUID; |
|
|
|
|
|
var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text }); |
|
|
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
Alert.Show("保存成功"); |
|
|
if (String.IsNullOrEmpty(TXT_CH.Text)) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.ShowInTop("中文名不能为空!"); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
if (ret.Result.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.ShowInTop("中文名称重复!"); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity }); |
|
|
|
|
|
if (ret1.State == ReturnStatus.Succeed) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.Show("保存成功"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
|
|
|
_entity.GUID = Guid.NewGuid().ToString("N").ToUpper(); |
|
|
|
|
|
_entity.CH = TXT_CH.Text; |
|
|
|
|
|
_entity.EN = TXT_EN.Text; |
|
|
|
|
|
_entity.RU = TXT_RU.Text; |
|
|
|
|
|
_entity.DE = TXT_DE.Text; |
|
|
|
|
|
_entity.FR = TXT_FR.Text; |
|
|
|
|
|
_entity.AR = TXT_AR.Text; |
|
|
|
|
|
_entity.JP = TXT_JP.Text; |
|
|
|
|
|
|
|
|
} |
|
|
var ret = SCP_TA_LANGUAGE_CONTROLLER.Get_TA_LANGUAGE_List(new TA_LANGUAGE { CH = TXT_CH.Text }); |
|
|
|
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
|
|
|
{ |
|
|
|
|
|
if (String.IsNullOrEmpty(_entity.CH)) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.ShowInTop("中文名不能为空!"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (ret.Result.Count > 0) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.ShowInTop("中文名称重复!"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity }); |
|
|
|
|
|
if (ret1.State == ReturnStatus.Succeed) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.Show("保存成功"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|