Browse Source

多语言维护

master
TML 4 years ago
parent
commit
434cf0b092
  1. 42
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx
  2. 3
      SCP/Views/BasicData/SCP_LANGUAGE_1.aspx.cs
  3. 33
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx
  4. 53
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.cs
  5. 4
      SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx.designer.cs

42
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" />
</Items>
</f:Toolbar>
</Toolbars>
</f:Form>
<f:Grid ID = "Grid_TA_LANGUAGE"
EnableCollapse = "true"
ShowBorder = "true"
ShowHeader = "true"
runat ="server"
BoxFlex="1"
EnableTextSelection="true"
<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"
IsDatabasePaging="true" AllowPaging="true"
AutoScroll="True" SortDirection="ASC"
SortField="UID"
OnPageIndexChange="Grid_TA_LANGUAGE_PageIndexChange"
>
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>

3
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 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)

33
SCP/Views/BasicData/SCP_LANGUAGE_DETAIL.aspx

@ -10,7 +10,7 @@
<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">
<f:Panel ID="Panel1" CssClass="blockpanel" runat="server" ShowBorder="true" ShowHeader="true" Layout="Region">
<Toolbars>
<f:Toolbar ID="Toolbar2" runat="server">
@ -22,8 +22,9 @@
</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_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" />
@ -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>--%>

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

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

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