Browse Source

多语言维护

master
TML 4 years ago
parent
commit
434cf0b092
  1. 48
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx
  2. 5
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs
  3. 39
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx
  4. 101
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs
  5. 4
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs

48
SCP/Views/BasicData/SCP_LANGUAGE_1.aspx

@ -26,30 +26,21 @@
</f:Button>
<f:Button ID="Update" runat="server" Text="修改" Icon="BasketEdit" OnClick="Button4_Click" >
</f:Button>
<f:TextBox runat = "server" Label = "" EmptyText = "请输入中文" ID = "TextCH" LabelWidth="50px" />
<f:TextBox runat = "server" Label = "中文" EmptyText = "请输入中文" ID = "TextCH" LabelWidth="50px" />
<f:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="快速查找" Icon="Find">
</f:Button>
<f:ToolbarSeparator runat="server" />
<f:ToolbarSeparator runat="server" />
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Grid ID = "Grid_TA_LANGUAGE"
EnableCollapse = "true"
ShowBorder = "true"
ShowHeader = "true"
runat ="server"
BoxFlex="1"
EnableTextSelection="true"
DataKeyNames = "UID,GUID,CH,EN,RU,DE,FR,EL,AR,JP,IsDeleted"
PageSize="100"
IsDatabasePaging="true" AllowPaging="true"
AutoScroll="True" SortDirection="ASC"
SortField="UID"
OnPageIndexChange="Grid_TA_LANGUAGE_PageIndexChange"
>
<f:Grid ID = "Grid_TA_LANGUAGE" ShowBorder = "true" ShowHeader = "true" runat ="server" EnableTextSelection="true"
DataKeyNames = "UID,GUID,CH,EN,RU,DE,FR,EL,AR,JP,IsDeleted"
AllowSorting="true" BoxFlex="1"
PageSize="100"
EnableRowDoubleClickEvent="True" SortField="UID"
IsDatabasePaging="True" AllowPaging="True"
AutoScroll="True" SortDirection="ASC" OnPageIndexChange="Grid_TA_LANGUAGE_PageIndexChange" >
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator3" runat="server">
</f:ToolbarSeparator>
@ -62,14 +53,15 @@
</f:DropDownList>
</PageItems>
<Columns >
<f:BoundField Width = "100px" DataField = "UID" DataFormatString = "{0}" HeaderText = "" Hidden="true"/>
<f:BoundField Width = "80px" DataField = "CH" DataFormatString = "{0}" HeaderText = "中文"/>
<f:BoundField Width = "80px" DataField = "EN" DataFormatString = "{0}" HeaderText = "英文"/>
<f:BoundField Width = "100px" DataField = "RU" DataFormatString = "{0}" HeaderText ="俄文" />
<f:BoundField Width = "100px" DataField = "DE" DataFormatString = "{0}" HeaderText = "德文" />
<f:BoundField Width = "100px" DataField = "FP" DataFormatString = "{0}" HeaderText ="法文" />
<f:BoundField Width = "100px" DataField = "AR" DataFormatString = "{0}" HeaderText ="阿拉伯" />
<f:BoundField Width = "100px" DataField = "JP" DataFormatString = "{0}" HeaderText ="日文" />
<f:BoundField runat="server" Width = "250px" DataField = "UID" DataFormatString = "{0}" HeaderText = "" Hidden="true"/>
<f:BoundField runat="server" Width = "250px" DataField = "GUID" DataFormatString = "{0}" HeaderText = "" Hidden="true"/>
<f:BoundField runat="server" Width = "250px" DataField = "CH" DataFormatString = "{0}" HeaderText = "中文" />
<f:BoundField runat="server" Width = "350px" DataField = "EN" DataFormatString = "{0}" HeaderText = "英文"/>
<f:BoundField runat="server" Width = "80px" DataField = "RU" DataFormatString = "{0}" HeaderText ="俄文" />
<f:BoundField runat="server" Width = "80px" DataField = "DE" DataFormatString = "{0}" HeaderText = "德文" />
<f:BoundField runat="server" Width = "80px" DataField = "FP" DataFormatString = "{0}" HeaderText ="法文" />
<f:BoundField runat="server" Width = "80px" DataField = "AR" DataFormatString = "{0}" HeaderText ="阿拉伯" />
<f:BoundField runat="server" Width = "80px" DataField = "JP" DataFormatString = "{0}" HeaderText ="日文" />
</Columns>
@ -78,8 +70,8 @@
</f:Panel>
<f:HiddenField ID="highlightRows" runat="server">
</f:HiddenField>
<f:Window runat="server" ID="Window1" Hidden="True" AutoScroll="True" Width="1024px" Height="600px" CloseAction="HidePostBack"
WindowPosition="Center" IsModal="true" Title="" Target="Parent" EnableIFrame="true"
<f:Window runat="server" ID="Window1" Hidden="True" AutoScroll="false" Width="800px" Height="350px" CloseAction="HidePostBack"
WindowPosition="Center" IsModal="true" Title="多语言明细" Target="Parent" EnableIFrame="true"
IFrameUrl="about:blank" />
</form>
</body>

5
SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs

@ -87,9 +87,10 @@ namespace SCP.Views.BasicData
}
protected void Button4_Click(object sender, EventArgs e)
{
string GUID = GetSelectedDataKey(Grid_TA_LANGUAGE, 1);
string CH = GetSelectedDataKey(Grid_TA_LANGUAGE, 2);
string EN = GetSelectedDataKey(Grid_TA_LANGUAGE, 3);
string url = String.Format("../BasicData/SCP_LANGUAGE_DETAIL.aspx?CH={0}&&EN={1}", CH, EN);
string EN = GetSelectedDataKey(Grid_TA_LANGUAGE, 3);
string url = String.Format("../BasicData/SCP_LANGUAGE_DETAIL.aspx?CH={0}&&EN={1}&&GUID={2}", CH, EN,GUID);
PageContext.RegisterStartupScript(Window1.GetShowReference(url));
}
protected void btnShow_Click1(object sender, EventArgs e)

39
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx

@ -8,9 +8,9 @@
<title></title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="0px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<form id="form1" runat="server" >
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"/>
<f:Panel ID="Panel1" CssClass="blockpanel" runat="server" ShowBorder="true" ShowHeader="true" Layout="Region">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
@ -22,9 +22,10 @@
</f:Toolbar>
</Toolbars>
<Items>
<f:Form runat="server" Title="" ID="F_PO_DETAIL" >
<f:Form runat="server" Width="550px" BodyPadding="25 25 30 25">
<Items>
<f:TextBox runat = "server" Label = "中文" EmptyText = "" ID = "TXT_CH" />
<f:TextBox runat = "server" Label = "编码" EmptyText = "" ID = "TXT_GUID" Hidden="true"/>
<f:TextBox runat = "server" Label = "中文" EmptyText = "" ID = "TXT_CH" />
<f:TextBox runat = "server" Label = "英文" EmptyText = "" ID = "TXT_EN" />
<f:TextBox runat = "server" Label = "俄文" EmptyText = "" ID = "TXT_RU" />
<f:TextBox runat = "server" Label = "德文" EmptyText = "" ID = "TXT_DE" />
@ -40,31 +41,3 @@
</body>
</html>
<%-- <form id="form1" runat="server">
<f:PageManager runat="server" AutoSizePanelID="Panel1" />
<f:Form ID="Panel1" Title="" runat="server" Width="600px" Height="400px"
LabelAlign="Right" LabelWidth="80px"
BodyPadding="5" ShowBorder="true" ShowHeader="true" Layout="VBox">
<Items>
<f:TextBox runat = "server" Label = "键值" EmptyText = "" ID = "TXT_GUID" />
<f:TextBox runat = "server" Label = "中文" EmptyText = "" ID = "TXT_CH" />
<f:TextBox runat = "server" Label = "英文" EmptyText = "" ID = "TXT_EN" />
<f:TextBox runat = "server" Label = "俄文" EmptyText = "" ID = "TXT_RU" />
<f:TextBox runat = "server" Label = "德文" EmptyText = "" ID = "TXT_DE" />
<f:TextBox runat = "server" Label = "法文" EmptyText = "" ID = "TXT_FR" />
<f:TextBox runat = "server" Label = "阿拉伯" EmptyText = "" ID = "TXT_AR" />
<f:TextBox runat = "server" Label = "日文" EmptyText = "" ID = "TXT_JP" />
<f:Button ID="Btn_Save" runat="server" EnablePostBack="True" Text="保存" Icon="SystemSave" OnClick="Btn_Save_Click" Width="200px">
</f:Button>
</Items>
</f:Form>
</form>
</body>
</html>
</form>
</body>
</html>--%>

101
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs

@ -42,46 +42,89 @@ namespace SCP.Views.BasicData
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.CH = Request["CH"];
_entity.EN = Request["EN"];
_entity.GUID = Request["GUID"];
TXT_CH.Text = _entity.CH;
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)
{
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)
{
Alert.ShowInTop("中文名称重复!");
return;
}
else
protected void Btn_Save_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(Request["CH"]))
{
var ret1 = SCP_TA_LANGUAGE_CONTROLLER.Save_TA_LANGUAGE(new List<TA_LANGUAGE>() { _entity });
if (ret1.State == ReturnStatus.Succeed)
TA_LANGUAGE _entity = new TA_LANGUAGE();
_entity.GUID = Request["GUID"];
_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;
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("保存成功");
}
}
}
}
}
}
}
}

4
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs

@ -60,13 +60,13 @@ namespace SCP.Views.BasicData
protected global::FineUI.Button Btn_Save;
/// <summary>
/// F_PO_DETAIL 控件。
/// TXT_GUID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUI.Form F_PO_DETAIL;
protected global::FineUI.TextBox TXT_GUID;
/// <summary>
/// TXT_CH 控件。

Loading…
Cancel
Save