|
@ -42,17 +42,20 @@ 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) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(Request["CH"])) |
|
|
{ |
|
|
{ |
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
TA_LANGUAGE _entity = new TA_LANGUAGE(); |
|
|
_entity.GUID = Guid.NewGuid().ToString("N").ToUpper(); |
|
|
_entity.GUID = Request["GUID"]; |
|
|
_entity.CH = TXT_CH.Text; |
|
|
_entity.CH = TXT_CH.Text; |
|
|
_entity.EN = TXT_EN.Text; |
|
|
_entity.EN = TXT_EN.Text; |
|
|
_entity.RU = TXT_RU.Text; |
|
|
_entity.RU = TXT_RU.Text; |
|
@ -60,10 +63,15 @@ namespace SCP.Views.BasicData |
|
|
_entity.FR = TXT_FR.Text; |
|
|
_entity.FR = TXT_FR.Text; |
|
|
_entity.AR = TXT_AR.Text; |
|
|
_entity.AR = TXT_AR.Text; |
|
|
_entity.JP = TXT_JP.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 }); |
|
|
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) |
|
|
if (ret.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (String.IsNullOrEmpty(TXT_CH.Text)) |
|
|
|
|
|
{ |
|
|
|
|
|
Alert.ShowInTop("中文名不能为空!"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if (ret.Result.Count > 0) |
|
|
if (ret.Result.Count > 0) |
|
|
{ |
|
|
{ |
|
|
Alert.ShowInTop("中文名称重复!"); |
|
|
Alert.ShowInTop("中文名称重复!"); |
|
@ -79,9 +87,44 @@ namespace SCP.Views.BasicData |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
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("保存成功"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|