diff --git a/BJFL_ZDXJGSInfo.aspx b/BJFL_ZDXJGSInfo.aspx index 76d8553..23da980 100644 --- a/BJFL_ZDXJGSInfo.aspx +++ b/BJFL_ZDXJGSInfo.aspx @@ -48,23 +48,23 @@ + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> @@ -73,48 +73,100 @@ + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> @@ -123,23 +175,23 @@ + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> @@ -148,23 +200,23 @@ + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> @@ -173,23 +225,23 @@ + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> + OnClick="LinkButton_Click"> diff --git a/BJFL_ZDXJGSInfo.aspx.cs b/BJFL_ZDXJGSInfo.aspx.cs index 1eb2180..951c14b 100644 Binary files a/BJFL_ZDXJGSInfo.aspx.cs and b/BJFL_ZDXJGSInfo.aspx.cs differ diff --git a/BJFL_ZDXJGSInfo.aspx.designer.cs b/BJFL_ZDXJGSInfo.aspx.designer.cs index a6d0b1e..f8561e1 100644 --- a/BJFL_ZDXJGSInfo.aspx.designer.cs +++ b/BJFL_ZDXJGSInfo.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // ´˴úÂëÓɹ¤¾ßÉú³ɡ£ -// ÔËÐÐʱ°汾:2.0.50727.9174 +// ÔËÐÐʱ°汾:2.0.50727.9179 // // ¶ԴËÎļþµĸü¸ĿÉÄܻᵼÖ²»ÕýȷµÄÐÐΪ£¬²¢ÇÒÈç¹û // ÖØÐÂÉú³ɴúÂ룬ÕâЩ¸ü¸Ľ«»ᶪʧ¡£ @@ -226,6 +226,132 @@ namespace GThinking.N_XLXSBJ { /// protected global::System.Web.UI.WebControls.LinkButton LinkJJ10; + /// + /// tr3 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow tr3; + + /// + /// trJJYZ3 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow trJJYZ3; + + /// + /// LinkJJ11 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ11; + + /// + /// LinkJJ12 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ12; + + /// + /// LinkJJ13 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ13; + + /// + /// LinkJJ14 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ14; + + /// + /// LinkJJ15 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ15; + + /// + /// tr5 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow tr5; + + /// + /// trJJYZ4 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.HtmlControls.HtmlTableRow trJJYZ4; + + /// + /// LinkJJ16 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ16; + + /// + /// LinkJJ17 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ17; + + /// + /// LinkJJ18 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ18; + + /// + /// LinkJJ19 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ19; + + /// + /// LinkJJ20 ¿ؼþ¡£ + /// + /// + /// ×Զ¯Éú³ɵÄ×ֶΡ£ + /// Ҫ½øÐÐÐ޸ģ¬Ç뽫×ֶÎÉùÃ÷´ÓÉè¼ÆÆ÷ÎļþÒƵ½´úÂëÒþ²ØÎļþ¡£ + /// + protected global::System.Web.UI.WebControls.LinkButton LinkJJ20; + /// /// LinkYZ01 ¿ؼþ¡£ /// diff --git a/BJYFDRInfo.aspx.cs b/BJYFDRInfo.aspx.cs index 7ab6c6d..d6b0678 100644 --- a/BJYFDRInfo.aspx.cs +++ b/BJYFDRInfo.aspx.cs @@ -122,7 +122,10 @@ namespace GThinking.N_XLXSBJ private void ClearExistingData(TDatabase database, TSQL sql) { sql.Clear(); - sql.Add(" DELETE FROM XLXSBJYFJZQJ where XLXSBJYFJZQJ_YFJSGS='Ô˼Û*ÔËÖØ' "); + if (PageParam.ContainsKey("YFJSFS") && PageParam.GetRTrimString("YFJSFS") == "6") + sql.Add(" DELETE FROM XLXSBJYFJZQJ where XLXSBJYFJZQJ_YFJSGS='6' "); + else + sql.Add(" DELETE FROM XLXSBJYFJZQJ where XLXSBJYFJZQJ_YFJSGS='Ô˼Û*ÔËÖØ' "); database.ExecSQL(sql); } @@ -172,8 +175,29 @@ namespace GThinking.N_XLXSBJ try { + if (PageParam.ContainsKey("YFJSFS") && PageParam.GetRTrimString("YFJSFS") == "6") + { + string separator = columnName.Contains("-") ? "-" : + (columnName.Contains("~") ? "~" : "ÖÁ"); + + string cleanName = columnName.Replace("ͭ¼Û", "").Replace("ÂÁ¼Û", ""); + + string[] parts = cleanName.Split(new string[] { separator }, StringSplitOptions.RemoveEmptyEntries); + + if (parts.Length >= 2) + { + double minValue, maxValue; + if (double.TryParse(parts[0], out minValue) && double.TryParse(parts[1], out maxValue)) + { + column.MinValue = minValue; + column.MaxValue = maxValue; + + return column; + } + } + } // ³¢ÊԽâÎö¸÷ÖÖÖØÁ¿Çø¼ä¸ñʽ - if (columnName.Contains("ÒÔÏÂ") || columnName.Contains("ÒÔÄÚ")) + else if (columnName.Contains("ÒÔÏÂ") || columnName.Contains("ÒÔÄÚ")) { // ´¦Àí "X¶ÖÒÔÏÂ" ¸ñʽ string valueStr = columnName.Replace("¶ÖÒÔÏÂ", "").Replace("¶ÖÒÔÄÚ", "").Replace("Á㵣±¨¼Û",""); @@ -204,6 +228,7 @@ namespace GThinking.N_XLXSBJ (columnName.Contains("~") ? "~" : "ÖÁ"); string cleanName = columnName.Substring(0, columnName.IndexOf("¶Ö")).Replace("¶Ö", "").Replace("Á㵣±¨¼Û", ""); + string[] parts = cleanName.Split(new string[] { separator }, StringSplitOptions.RemoveEmptyEntries); if (parts.Length >= 2) @@ -248,6 +273,8 @@ namespace GThinking.N_XLXSBJ sql.ParamByName("XLXSBJYFJZQJ_YFJZXX").Value = column.MinValue; sql.ParamByName("XLXSBJYFJZQJ_YFJZSX").Value = column.MaxValue; sql.ParamByName("XLXSBJYFJZQJ_YFJSGS").Value = "Ô˼Û*ÔËÖØ"; + if (PageParam.ContainsKey("YFJSFS") && PageParam.GetRTrimString("YFJSFS")=="6") + sql.ParamByName("XLXSBJYFJZQJ_YFJSGS").Value = "6"; sql.ParamByName("XLXSBJYFJZQJ_WHR").Value = tSession.UserName; sql.ParamByName("XLXSBJYFJZQJ_WHRID").Value = tSession.UserId; sql.ParamByName("XLXSBJYFJZQJ_WHSJ").Value = DateTime.Now; @@ -289,6 +316,8 @@ namespace GThinking.N_XLXSBJ sql.ParamByName("XLXSBJDQYFZB_XZQHID").Value = sXZQHID; sql.ParamByName("XLXSBJDQYFZB_YFJSFS").Value = "1"; + if (PageParam.ContainsKey("YFJSFS") && PageParam.GetRTrimString("YFJSFS") == "6") + sql.ParamByName("XLXSBJDQYFZB_YFJSFS").Value = "6"; sql.ParamByName("XLXSBJDQYFZB_WHR").Value = tSession.UserName; sql.ParamByName("XLXSBJDQYFZB_WHRID").Value = tSession.UserId; sql.ParamByName("XLXSBJDQYFZB_WHSJ").Value = DateTime.Now; @@ -304,20 +333,36 @@ namespace GThinking.N_XLXSBJ !string.IsNullOrEmpty(row[weightColumn.ColumnIndex].ToString())) { double YFDJ = 0; - if (double.TryParse(row[weightColumn.ColumnIndex].ToString(), out YFDJ)) + if (double.TryParse(row[weightColumn.ColumnIndex].ToString().Replace("%",""), out YFDJ)) { int JZQH = intervalIdMap[weightColumn.ColumnName]; + if (PageParam.ContainsKey("YFJSFS") && PageParam.GetRTrimString("YFJSFS") == "6") + { + sql.Clear(); + sql.Add(@"INSERT INTO XLXSBJDQYFB (XLXSBJDQYFB_XZQHID, XLXSBJDQYFB_YFJZQH, XLXSBJDQYFB_YSFL, XLXSBJDQYFB_WHR, XLXSBJDQYFB_WHRID, XLXSBJDQYFB_WHSJ) + VALUES (:XLXSBJDQYFB_XZQHID, :XLXSBJDQYFB_YFJZQH, :XLXSBJDQYFB_YSFL, :XLXSBJDQYFB_WHR, :XLXSBJDQYFB_WHRID, :XLXSBJDQYFB_WHSJ) "); - sql.Clear(); - sql.Add(@"INSERT INTO XLXSBJDQYFB (XLXSBJDQYFB_XZQHID, XLXSBJDQYFB_YFJZQH, XLXSBJDQYFB_YFDJ, XLXSBJDQYFB_WHR, XLXSBJDQYFB_WHRID, XLXSBJDQYFB_WHSJ) + sql.ParamByName("XLXSBJDQYFB_XZQHID").Value = sXZQHID; + sql.ParamByName("XLXSBJDQYFB_YFJZQH").Value = JZQH; + sql.ParamByName("XLXSBJDQYFB_YSFL").Value = YFDJ; + sql.ParamByName("XLXSBJDQYFB_WHR").Value = tSession.UserName; + sql.ParamByName("XLXSBJDQYFB_WHRID").Value = tSession.UserId; + sql.ParamByName("XLXSBJDQYFB_WHSJ").Value = DateTime.Now; + } + else + { + sql.Clear(); + sql.Add(@"INSERT INTO XLXSBJDQYFB (XLXSBJDQYFB_XZQHID, XLXSBJDQYFB_YFJZQH, XLXSBJDQYFB_YFDJ, XLXSBJDQYFB_WHR, XLXSBJDQYFB_WHRID, XLXSBJDQYFB_WHSJ) VALUES (:XLXSBJDQYFB_XZQHID, :XLXSBJDQYFB_YFJZQH, :XLXSBJDQYFB_YFDJ, :XLXSBJDQYFB_WHR, :XLXSBJDQYFB_WHRID, :XLXSBJDQYFB_WHSJ) "); - sql.ParamByName("XLXSBJDQYFB_XZQHID").Value = sXZQHID; - sql.ParamByName("XLXSBJDQYFB_YFJZQH").Value = JZQH; - sql.ParamByName("XLXSBJDQYFB_YFDJ").Value = YFDJ; - sql.ParamByName("XLXSBJDQYFB_WHR").Value = tSession.UserName; - sql.ParamByName("XLXSBJDQYFB_WHRID").Value = tSession.UserId; - sql.ParamByName("XLXSBJDQYFB_WHSJ").Value = DateTime.Now; + sql.ParamByName("XLXSBJDQYFB_XZQHID").Value = sXZQHID; + sql.ParamByName("XLXSBJDQYFB_YFJZQH").Value = JZQH; + sql.ParamByName("XLXSBJDQYFB_YFDJ").Value = YFDJ; + sql.ParamByName("XLXSBJDQYFB_WHR").Value = tSession.UserName; + sql.ParamByName("XLXSBJDQYFB_WHRID").Value = tSession.UserId; + sql.ParamByName("XLXSBJDQYFB_WHSJ").Value = DateTime.Now; + } + database.ExecSQL(sql); } @@ -330,33 +375,46 @@ namespace GThinking.N_XLXSBJ private void ExcelColumnValid(DataSet dataSet) { DataTable dataTable = dataSet.Tables[0]; - if (dataTable.Rows.Count < 2) + if (PageParam.ContainsKey("YFJSFS") && PageParam.GetRTrimString("YFJSFS") == "6") { - throw new Exception("ExcelÎļþÐÐÊý²»×㣬ÖÁÉÙÐèҪ2Ðбíͷ"); - } - DataRow headerRow1 = dataTable.Rows[0]; - DataRow headerRow2 = dataTable.Rows[1]; - - // ´¦ÀíÖØÁ¿Çø¼äÁУ¨´ÓË÷Òý2¿ªʼ£© - for (int i = 2; i < dataTable.Columns.Count; i++) - { - string header1 = headerRow1[i].ToString().Trim(); - string header2 = headerRow2[i].ToString().Trim(); - - // ºϲ¢Á½ÐбíͷÄÚÈÝ - string combinedHeader = header1.Trim(); - if (!string.IsNullOrEmpty(header2)) + if (dataTable.Rows.Count < 1) { - combinedHeader +=header2.Trim(); + throw new Exception("ExcelÎļþÐÐÊý²»×㣬ÖÁÉÙÐèҪ1Ðбíͷ"); + } + + } + else + { + if (dataTable.Rows.Count < 2) + { + throw new Exception("ExcelÎļþÐÐÊý²»×㣬ÖÁÉÙÐèҪ2Ðбíͷ"); + } + DataRow headerRow1 = dataTable.Rows[0]; + DataRow headerRow2 = dataTable.Rows[1]; + + // ´¦ÀíÖØÁ¿Çø¼äÁУ¨´ÓË÷Òý2¿ªʼ£© + for (int i = 2; i < dataTable.Columns.Count; i++) + { + string header1 = headerRow1[i].ToString().Trim(); + string header2 = headerRow2[i].ToString().Trim(); + + // ºϲ¢Á½ÐбíͷÄÚÈÝ + string combinedHeader = header1.Trim(); + if (!string.IsNullOrEmpty(header2)) + { + combinedHeader += header2.Trim(); + } + + // ¸üÐÂÁÐÃû + dataTable.Columns[i].ColumnName = combinedHeader; } - // ¸üÐÂÁÐÃû - dataTable.Columns[i].ColumnName = combinedHeader; + // ÒƳý±íͷÐУ¬±£ÁôÊý¾ÝÐÐ + dataTable.Rows.RemoveAt(0); + dataTable.Rows.RemoveAt(0); } - - // ÒƳý±íͷÐУ¬±£ÁôÊý¾ÝÐÐ - dataTable.Rows.RemoveAt(0); - dataTable.Rows.RemoveAt(0); + + } private void ReadWJ(string sPath, ref DataSet aDataExcel) diff --git a/BJYFJZQJList.aspx.cs b/BJYFJZQJList.aspx.cs index ff1d72e..f79fe6a 100644 --- a/BJYFJZQJList.aspx.cs +++ b/BJYFJZQJList.aspx.cs @@ -50,6 +50,12 @@ namespace GThinking.N_XLXSBJ grdContentGrid.Columns[2].HeaderText = ">(¶Ö)"; grdContentGrid.Columns[3].HeaderText = "<=(¶Ö)"; } + + if (PageParam.GetRTrimString("YFJSFS").Equals("6")) + { + grdContentGrid.Columns[2].HeaderText = ">(Ԫ)"; + grdContentGrid.Columns[3].HeaderText = "<=(Ԫ)"; + } Master_OnStandardQuery(null, null); } TPageParams pageParams = new TPageParams(); @@ -144,6 +150,11 @@ namespace GThinking.N_XLXSBJ grdContentGrid.FindColumnByFieldName("XLXSBJYFJZQJ_YFJSGS").Visible = false; grdContentGrid.FindColumnByFieldName("XLXSBJYFJZQJ_YFJSGS3").Visible = true; } + else if (PageParam.GetRTrimString("YFJSFS").Equals("6")) + { + grdContentGrid.FindColumnByFieldName("XLXSBJYFJZQJ_YFJSGS").Visible = false; + grdContentGrid.FindColumnByFieldName("XLXSBJYFJZQJ_YFJSGS3").Visible = false; + } } #endregion diff --git a/BJYF_TLJQJ.cs b/BJYF_TLJQJ.cs new file mode 100644 index 0000000..0bb2629 --- /dev/null +++ b/BJYF_TLJQJ.cs @@ -0,0 +1,108 @@ +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using GThinking.N_MODEL.Page; +using GThinking.N_MISPRO.Data; + +namespace GThinking.N_XLXSBJ +{ + #region 数据表级映射 + [TableMap(DB = "DBERP", DbTableName = "XLXSBJDQYFB", Umid = 100860173, IsWorkFlow = false, IsAttach = false, UseWhr = true, + QuerySelSql = " select XLXSBJDQYFB_XZQHID,XLXSBJDQYFB_YFJZQH,XLXSBJDQYFB_YSFL, " + + " XLXSBJDQYFB_WHR,XLXSBJDQYFB_WHRID,XLXSBJDQYFB_WHSJ " + + " from XLXSBJDQYFB where 1=1", + EntitySelSql = " select XLXSBJDQYFB_XZQHID,XLXSBJDQYFB_YFJZQH,XLXSBJDQYFB_YSFL, " + + " XLXSBJDQYFB_WHR,XLXSBJDQYFB_WHRID,XLXSBJDQYFB_WHSJ " + + " from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID=:XLXSBJDQYFB_XZQHID", + UpdateSql = "", + InsertSql = "", + DeleteSql = " delete from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID=:XLXSBJDQYFB_XZQHID ")] + #endregion + public class BJYF_TLJQJ : EntityManager + { + #region 字段级映射 + + private string _XLXSBJDQYFB_XZQHID; + [ColumnMap(DbField = "XLXSBJDQYFB_XZQHID", CtrlName = "txtXZQHID", DbTitle = "行政区划ID", Type = FieldType.HiddenField, DefaultValue = "", + IsAllowNull = false, IsKey = true, Length = 20)] + public string XLXSBJDQYFB_XZQHID + { + get { return _XLXSBJDQYFB_XZQHID; } + set { _XLXSBJDQYFB_XZQHID = value; } + } + + private string _XLXSBJDQYFB_YFJZQH; + [ColumnMap(DbField = "XLXSBJDQYFB_YFJZQH", CtrlName = "txtYFJZQH", DbTitle = "运费计重区号", Type = FieldType.C, DefaultValue = "", + IsAllowNull = true, IsKey = false, Length = 10)] + public string XLXSBJDQYFB_YFJZQH + { + get { return _XLXSBJDQYFB_YFJZQH; } + set { _XLXSBJDQYFB_YFJZQH = value; } + } + + private string _XLXSBJDQYFB_YSFL; + [ColumnMap(DbField = "XLXSBJDQYFB_YSFL", CtrlName = "txtYSFL", DbTitle = "运输费率", Type = FieldType.F, DefaultValue = "0", + IsAllowNull = true, IsKey = false, Length = 0)] + public string XLXSBJDQYFB_YSFL + { + get { return _XLXSBJDQYFB_YSFL; } + set { _XLXSBJDQYFB_YSFL = value; } + } + + private string _XLXSBJDQYFB_WHR; + [ColumnMap(DbField = "XLXSBJDQYFB_WHR", CtrlName = "txtWHR", DbTitle = "维护人", Type = FieldType.C, DefaultValue = "", + IsAllowNull = true, IsKey = false, Length = 30)] + public string XLXSBJDQYFB_WHR + { + get { return _XLXSBJDQYFB_WHR; } + set { _XLXSBJDQYFB_WHR = value; } + } + + private string _XLXSBJDQYFB_WHRID; + [ColumnMap(DbField = "XLXSBJDQYFB_WHRID", CtrlName = "txtWHRID", DbTitle = "维护人工号", Type = FieldType.HiddenField, DefaultValue = "", + IsAllowNull = true, IsKey = false, Length = 10)] + public string XLXSBJDQYFB_WHRID + { + get { return _XLXSBJDQYFB_WHRID; } + set { _XLXSBJDQYFB_WHRID = value; } + } + + private string _XLXSBJDQYFB_WHSJ; + [ColumnMap(DbField = "XLXSBJDQYFB_WHSJ", CtrlName = "datWHSJ", DbTitle = "维护时间", Type = FieldType.DT, DefaultValue = "", + IsAllowNull = true, IsKey = false, Length = 0)] + public string XLXSBJDQYFB_WHSJ + { + get { return _XLXSBJDQYFB_WHSJ; } + set { _XLXSBJDQYFB_WHSJ = value; } + } + + #endregion + } + + [EntityType(Db = "DBERP", Table = "XLXSBJYFJZQJ", IsWf = false, IsWhr = false, WhrPrefix = "", IsAttach = false)] + public class BJYF_TLJQJ_Grid : EntityObject + { + public string sXZQHID = ""; + + public override TSQL SetQuerySql() + { + TSQL SQL = base.SetQuerySql(); + SQL.Add("select XLXSBJYFJZQJ_YFJZQH,XLXSBJYFJZQJ_YFJZQJMC,isnull(XLXSBJDQYFB_YSFL,0) as YSFL "); + SQL.Add(" from XLXSBJYFJZQJ"); + SQL.Add(" left join (select XLXSBJDQYFB_YFJZQH,XLXSBJDQYFB_YSFL from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID=:pXZQHID and XLXSBJDQYFB_YFJZQH<>' ') a"); + SQL.Add(" on a.XLXSBJDQYFB_YFJZQH=XLXSBJYFJZQJ_YFJZQH"); + SQL.Add(" where XLXSBJYFJZQJ_YFJSGS = '6' "); + SQL.Add("order by XLXSBJYFJZQJ_YFJZQH"); + SQL.ParamByName("pXZQHID").Value = sXZQHID; + return SQL; + } + } + + +} diff --git a/BJYF_TLJQJInfo.aspx b/BJYF_TLJQJInfo.aspx new file mode 100644 index 0000000..af4baf0 --- /dev/null +++ b/BJYF_TLJQJInfo.aspx @@ -0,0 +1,76 @@ +<%@ Page Language="C#" AutoEventWireup="True" Codebehind="BJYF_TLJQJInfo.aspx.cs" Inherits="GThinking.N_XLXSBJ.BJYF_TLJQJInfo" + MasterPageFile="~/N_MODEL/Page/MasterOperation.Master" Title="按运距铜铝价区间维护运费比例" %> + +<%@ MasterType VirtualPath="~/N_MODEL/Page/MasterOperation.Master" %> + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+
+
+ + + + + + +
+
+
+ + + + + + + +
+
+
+
+
+
+ + +
diff --git a/BJYF_TLJQJInfo.aspx.cs b/BJYF_TLJQJInfo.aspx.cs new file mode 100644 index 0000000..6a10a26 --- /dev/null +++ b/BJYF_TLJQJInfo.aspx.cs @@ -0,0 +1,377 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using GThinking.N_MISPRO; +using GThinking.N_MISPRO.Data; +using GThinking.N_MODEL.Page; +using GThinking.N_MISPRO.Utility; +using GThinking.N_CONTROL; +using GThinking.N_PUBLIC; + +namespace GThinking.N_XLXSBJ +{ + public partial class BJYF_TLJQJInfo : OperationBase + { + BJYF_TLJQJ_Grid entity = new BJYF_TLJQJ_Grid(); + + protected void Page_Load(object sender, EventArgs e) + { + this.UMID = 100860173; + this.UMName = "按运距铜铝价区间维护运费比例"; + this.CurMaster = Master; + this.Tabs = Tab; + this.PageHeight = 500; + this.PageWidth = 700; + AddListSetMap(new ListSet(pagSHD.ID, null, grdSHD, entity, UPSHD)); + + if (!IsPostBack) + { + this.Master.PnlQuery.GroupingText = "查询条件"; + this.Master.PnlBill.GroupingText = "单据信息"; + this.Master.PnlQuery.Visible = false; + Master.BtnQueryVisible = false; + + InitControls(); + + if (!PageParam.GetRTrimString("XLXSBJDQYFB_XZQHID").Equals("")) + { + txtXZQHID.Value = PageParam.GetRTrimString("XLXSBJDQYFB_XZQHID"); + txtOLD_XZQHID.Value = PageParam.GetRTrimString("XLXSBJDQYFB_XZQHID"); + LoadXZQH(txtXZQHID.Value); + btnDel.Visible = true; + } + else + { + btnDel.Visible = false; + } + } + + base.InitPage(); + + if (!IsPostBack) + { + Master_OnQuery(); + GridDataBind(); + } + } + + #region 模板继承事件 + protected override void Master_OnQuery() + { + entity.sXZQHID = txtXZQHID.Value.Trim(); + base.Master_OnQuery(); + } + + protected override void GridDataBind() + { + base.GridDataBind(); + } + + protected override bool DataLogicValid() + { + if (cbxKHSZDPRO.SelectedValue.Trim().Equals("") && cbxKHSZDCITY.SelectedValue.Trim().Equals("") && cbxKHSZDCOUNTY.SelectedValue.Trim().Equals("")) + { + ShowMessage("地区--不允许为空!"); + return false; + } + + if (!cbxKHSZDCOUNTY.SelectedValue.Trim().Equals("")) + txtXZQHID.Value = cbxKHSZDCOUNTY.SelectedValue.Trim(); + else if (!cbxKHSZDCITY.SelectedValue.Trim().Equals("")) + txtXZQHID.Value = cbxKHSZDCITY.SelectedValue.Trim(); + else if (!cbxKHSZDPRO.SelectedValue.Trim().Equals("")) + txtXZQHID.Value = cbxKHSZDPRO.SelectedValue.Trim(); + else + txtXZQHID.Value = ""; + + if (!txtOLD_XZQHID.Value.Trim().Equals(txtXZQHID.Value.Trim())) + { + if (CMISproDataBase.ExistsRecord("DBERP", string.Format("select 1 from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID='{0}' and XLXSBJDQYFB_YFJZQH<>' ' ", txtXZQHID.Value))) + { + ShowMessage("所选地区已设置运费!"); + return false; + } + } + + return base.DataLogicValid(); + } + + protected override bool Master_OnOK() + { + TDatabase DBERP = null; + try + { + string sXZQHID = txtXZQHID.Value.Trim(); + DBERP = TContextDatabases.GetDatabase("DBERP"); + DBERP.BeginTrans(); + InsertXLXSBJDQYFB(DBERP); + DBERP.CommitTrans(); + ShowMessage("设置成功!"); + DialogOperationScript dos = new DialogOperationScript(this); + dos.CloseSelf(); + dos.Execute(); + } + catch (Exception ex) + { + ShowMessage(ex.Message); + DBERP.RollbackTrans(); + return false; + } + return true; + } + #endregion + + #region 控件事件 + protected void btnDel_Click(object sender, EventArgs e) + { + Confirm.Register("IsQD", "将删除当前记录,是否继续?"); + Confirm.ShowBtnText = TConfirm.cBtnText.Yes_No; + if (Confirm.GetValue("IsQD").Trim().Equals("")) + { + Confirm.Ask("IsQD"); + return; + } + else if (Confirm.GetValue("IsQD").Trim().Equals("N")) + { + Confirm.Clear(); + return; + } + else if (Confirm.GetValue("IsQD").Trim().Equals("Y")) + { + Confirm.Clear(); + } + + TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); + dberp.BeginTrans(); + TSQL SQL = new TSQL(dberp); + SQL.Add("delete from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID=:pXZQHID and XLXSBJDQYFB_YFJZQH<>' '"); + SQL.ParamByName("pXZQHID").Value = txtXZQHID.Value.Trim(); + dberp.ExecSQL(SQL); + dberp.CommitTrans(); + ShowMessage("删除成功!"); + CloseWindow(); + } + + protected void cbxKHSZDPRO_OnSelectedIndexChanged(object sender, EventArgs e) + { + if (!IsPostBack) + return; + cbxKHSZDCITY.ClearItems(); + cbxKHSZDCITY.SelectedValue = ""; + cbxKHSZDCOUNTY.ClearItems(); + cbxKHSZDCOUNTY.SelectedValue = ""; + if (!cbxKHSZDPRO.SelectedValue.Trim().Equals("")) + { + TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); + TSQL SQL = new TSQL(dberp); + SQL.Clear(); + SQL.Add(" select XZQH_XZQHID,XZQH_CITY from XZQH where XZQH_FID = :pFID "); + SQL.Add(" order by XZQH_XZQHID "); + SQL.ParamByName("pFID").Value = cbxKHSZDPRO.SelectedValue.Trim(); + DataSet ds = dberp.OpenDataSet(SQL); + cbxKHSZDCITY.Items.Add(new ListItem("", "")); + if (ds.Tables[0].Rows.Count > 0) + { + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + if (!ds.Tables[0].Rows[i]["XZQH_CITY"].ToString().Trim().Equals("")) + { + cbxKHSZDCITY.Items.Add(new ListItem(ds.Tables[0].Rows[i]["XZQH_CITY"].ToString().Trim(), ds.Tables[0].Rows[i]["XZQH_XZQHID"].ToString().Trim())); + } + } + if (cbxKHSZDCITY.Items.Count == 2) + { + cbxKHSZDCITY.SelectedIndex = 1; + } + } + } + RefreshGrid(); + } + + protected void cbxKHSZDCITY_OnSelectedIndexChanged(object sender, EventArgs e) + { + if (!IsPostBack) + return; + cbxKHSZDCOUNTY.ClearItems(); + cbxKHSZDCOUNTY.SelectedValue = ""; + if (!cbxKHSZDCITY.SelectedValue.Trim().Equals("")) + { + TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); + TSQL SQL = new TSQL(dberp); + SQL.Clear(); + SQL.Add(" select XZQH_XZQHID,XZQH_COUNTY from XZQH where XZQH_FID = :pFID "); + SQL.Add(" order by XZQH_XZQHID "); + SQL.ParamByName("pFID").Value = cbxKHSZDCITY.SelectedValue.Trim(); + DataSet ds = dberp.OpenDataSet(SQL); + cbxKHSZDCOUNTY.Items.Add(new ListItem("", "")); + if (ds.Tables[0].Rows.Count > 0) + { + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + if (!ds.Tables[0].Rows[i]["XZQH_COUNTY"].ToString().Trim().Equals("")) + { + cbxKHSZDCOUNTY.Items.Add(new ListItem(ds.Tables[0].Rows[i]["XZQH_COUNTY"].ToString().Trim(), ds.Tables[0].Rows[i]["XZQH_XZQHID"].ToString().Trim())); + } + } + if (cbxKHSZDCOUNTY.Items.Count == 2) + { + cbxKHSZDCOUNTY.SelectedIndex = 1; + } + } + } + RefreshGrid(); + } + + protected void cbxKHSZDCOUNTY_OnSelectedIndexChanged(object sender, EventArgs e) + { + RefreshGrid(); + } + #endregion + + #region 自定义函数 + private void InitControls() + { + TComboBox.SetComboBox("DBERP", cbxKHSZDPRO, "select XZQH_XZQHID,XZQH_PROVINCE from XZQH where XZQH_FID = '86' ORDER BY XZQH_XZQHID ", false); + } + + private void LoadXZQH(string sXZQHID) + { + TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); + TSQL SQL = new TSQL(dberp); + SQL.Clear(); + SQL.Add("select XZQH_XZQHID,XZQH_FID,XZQH_PROVINCE,XZQH_CITY,XZQH_COUNTY from XZQH where XZQH_XZQHID = :pXZQHID "); + SQL.ParamByName("pXZQHID").Value = sXZQHID; + DataSet ds = dberp.OpenDataSet(SQL); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["XZQH_FID"].ToString().Trim().Equals("86")) + { + cbxKHSZDPRO.SelectedValue = ds.Tables[0].Rows[0]["XZQH_XZQHID"].ToString().Trim(); + cbxKHSZDCITY.SelectedValue = ""; + cbxKHSZDCOUNTY.SelectedValue = ""; + } + else if (ds.Tables[0].Rows[0]["XZQH_FID"].ToString().Trim().EndsWith("0000")) + { + cbxKHSZDPRO.SelectedValue = ds.Tables[0].Rows[0]["XZQH_FID"].ToString().Trim(); + cbxKHSZDCITY.SelectedValue = ds.Tables[0].Rows[0]["XZQH_XZQHID"].ToString().Trim(); + } + else + { + cbxKHSZDCITY.SelectedValue = ds.Tables[0].Rows[0]["XZQH_FID"].ToString().Trim(); + cbxKHSZDCOUNTY.SelectedValue = ds.Tables[0].Rows[0]["XZQH_XZQHID"].ToString().Trim(); + TSQL sSQL = new TSQL(dberp); + sSQL.Clear(); + sSQL.Add("select XZQH_XZQHID,XZQH_FID from XZQH where XZQH_XZQHID = :pXZQHID "); + sSQL.ParamByName("pXZQHID").Value = cbxKHSZDCITY.SelectedValue.Trim(); + DataSet dsPRO = dberp.OpenDataSet(sSQL); + if (dsPRO.Tables[0].Rows.Count > 0) + { + cbxKHSZDPRO.SelectedValue = dsPRO.Tables[0].Rows[0]["XZQH_FID"].ToString().Trim(); + } + } + + SQL.Clear(); + SQL.Add(" select XZQH_XZQHID,XZQH_CITY from XZQH where XZQH_FID = :pFID "); + SQL.Add(" order by XZQH_XZQHID "); + SQL.ParamByName("pFID").Value = cbxKHSZDPRO.SelectedValue.Trim(); + DataSet ds1 = dberp.OpenDataSet(SQL); + cbxKHSZDCITY.Items.Add(new ListItem("", "")); + if (ds1.Tables[0].Rows.Count > 0) + { + for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) + { + if (!ds1.Tables[0].Rows[i]["XZQH_CITY"].ToString().Trim().Equals("")) + { + cbxKHSZDCITY.Items.Add(new ListItem(ds1.Tables[0].Rows[i]["XZQH_CITY"].ToString().Trim(), ds1.Tables[0].Rows[i]["XZQH_XZQHID"].ToString().Trim())); + } + } + } + + SQL.Clear(); + SQL.Add(" select XZQH_XZQHID,XZQH_COUNTY from XZQH where XZQH_FID = :pFID "); + SQL.Add(" order by XZQH_XZQHID "); + SQL.ParamByName("pFID").Value = cbxKHSZDCITY.SelectedValue.Trim(); + DataSet dsCOUNTY = dberp.OpenDataSet(SQL); + cbxKHSZDCOUNTY.Items.Add(new ListItem("", "")); + if (dsCOUNTY.Tables[0].Rows.Count > 0) + { + for (int i = 0; i < dsCOUNTY.Tables[0].Rows.Count; i++) + { + if (!dsCOUNTY.Tables[0].Rows[i]["XZQH_COUNTY"].ToString().Trim().Equals("")) + { + cbxKHSZDCOUNTY.Items.Add(new ListItem(dsCOUNTY.Tables[0].Rows[i]["XZQH_COUNTY"].ToString().Trim(), dsCOUNTY.Tables[0].Rows[i]["XZQH_XZQHID"].ToString().Trim())); + } + } + } + } + } + + private void InsertXLXSBJDQYFB(TDatabase dberp) + { + string sXZQHID = txtXZQHID.Value.Trim(); + + TSQL SQL = new TSQL(dberp); + SQL.Add("delete from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID=:pXZQHID and XLXSBJDQYFB_YFJZQH<>' '"); + SQL.ParamByName("pXZQHID").Value = sXZQHID; + dberp.ExecSQL(SQL); + + foreach (GridViewRow row in grdSHD.NewRows) + { + double dYSFL = CMISproConvert.StrToFloat(grdSHD.GetValueByFieldName("YSFL", row), 0); + string sYFJZQH = grdSHD.GetValueByFieldName("XLXSBJYFJZQJ_YFJZQH", row).Trim(); + if (string.IsNullOrEmpty(sYFJZQH)) + continue; + + SQL.Clear(); + SQL.Add("insert into XLXSBJDQYFB(XLXSBJDQYFB_XZQHID,XLXSBJDQYFB_YFJZQH,XLXSBJDQYFB_YSFL,XLXSBJDQYFB_WHR,XLXSBJDQYFB_WHRID,XLXSBJDQYFB_WHSJ)"); + SQL.Add(string.Format("select '{0}' as XZQHID,'{1}' as YFJZQH,'{2}' AS YSFL, '{3}' as WHR,'{4}' as WHRID,'{5}' as WHSJ ", + sXZQHID, sYFJZQH, dYSFL, CurSession.UserName, CurSession.UserId, DateTime.Now)); + dberp.ExecSQL(SQL); + } + } + + private void RefreshGrid() + { + string sXZQHID = ""; + if (!cbxKHSZDCOUNTY.SelectedValue.Trim().Equals("")) + sXZQHID = cbxKHSZDCOUNTY.SelectedValue.Trim(); + else if (!cbxKHSZDCITY.SelectedValue.Trim().Equals("")) + sXZQHID = cbxKHSZDCITY.SelectedValue.Trim(); + else if (!cbxKHSZDPRO.SelectedValue.Trim().Equals("")) + sXZQHID = cbxKHSZDPRO.SelectedValue.Trim(); + grdSHD.DataSource = GetGridTable(sXZQHID); + grdSHD.DataBind(); + grdSHD.SaveDataInfo.SaveDataFlag = DSaveDataFlag.sdNormal; + FormAreaUpdate(); + } + + private DataTable GetGridTable(string sXZQHID) + { + DataTable dt = new DataTable(); + TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); + TSQL SQL = new TSQL(dberp); + SQL.Clear(); + SQL.Add("select XLXSBJYFJZQJ_YFJZQH,XLXSBJYFJZQJ_YFJZQJMC,isnull(XLXSBJDQYFB_YSFL,0) as YSFL "); + SQL.Add(" from XLXSBJYFJZQJ"); + SQL.Add(" left join (select XLXSBJDQYFB_YFJZQH,XLXSBJDQYFB_YSFL from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID=:pXZQHID and XLXSBJDQYFB_YFJZQH<>' ') a"); + SQL.Add(" on a.XLXSBJDQYFB_YFJZQH=XLXSBJYFJZQJ_YFJZQH"); + SQL.Add(" where XLXSBJYFJZQJ_YFJSGS = '6' "); + SQL.Add("order by XLXSBJYFJZQJ_YFJZQH"); + SQL.ParamByName("pXZQHID").Value = sXZQHID; + DataSet ds = dberp.OpenDataSet(SQL); + if (ds.Tables.Count > 0) + { + dt = ds.Tables[0]; + } + return dt; + } + #endregion + } +} diff --git a/BJYF_TLJQJInfo.aspx.designer.cs b/BJYF_TLJQJInfo.aspx.designer.cs new file mode 100644 index 0000000..0e3db2d --- /dev/null +++ b/BJYF_TLJQJInfo.aspx.designer.cs @@ -0,0 +1,142 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:2.0.50727.9179 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace GThinking.N_XLXSBJ { + + + /// + /// BJYF_TLJQJInfo 类。 + /// + /// + /// 自动生成的类。 + /// + public partial class BJYF_TLJQJInfo { + + /// + /// CustomButton 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Table CustomButton; + + /// + /// btnDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtToolButton btnDel; + + /// + /// GtLabel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel GtLabel3; + + /// + /// cbxKHSZDPRO 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtComboBox cbxKHSZDPRO; + + /// + /// cbxKHSZDCITY 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtComboBox cbxKHSZDCITY; + + /// + /// cbxKHSZDCOUNTY 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtComboBox cbxKHSZDCOUNTY; + + /// + /// Tab 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtPageControl Tab; + + /// + /// pagSHD 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtPagePanel pagSHD; + + /// + /// UPSHD 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.UpdatePanel UPSHD; + + /// + /// grdSHD 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtAjaxGridView grdSHD; + + /// + /// txtXZQHID 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.HiddenField txtXZQHID; + + /// + /// txtOLD_XZQHID 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.HiddenField txtOLD_XZQHID; + + /// + /// Master 属性。 + /// + /// + /// 自动生成的属性。 + /// + public new GThinking.N_MODEL.Page.MasterOperation Master { + get { + return ((GThinking.N_MODEL.Page.MasterOperation)(base.Master)); + } + } + } +} diff --git a/BJYF_TLJQJList.aspx b/BJYF_TLJQJList.aspx new file mode 100644 index 0000000..d5d586c --- /dev/null +++ b/BJYF_TLJQJList.aspx @@ -0,0 +1,49 @@ +<%@ Page Language="C#" MasterPageFile="~/N_MODEL/Page/MasterSingleGrid.Master" AutoEventWireup="true" + Codebehind="BJYF_TLJQJList.aspx.cs" Inherits="GThinking.N_XLXSBJ.BJYF_TLJQJList" Title="按运距铜铝价区间维护运费比例" %> + +<%@ MasterType VirtualPath="~/N_MODEL/Page/MasterSingleGrid.Master" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BJYF_TLJQJList.aspx.cs b/BJYF_TLJQJList.aspx.cs new file mode 100644 index 0000000..20f37c3 --- /dev/null +++ b/BJYF_TLJQJList.aspx.cs @@ -0,0 +1,223 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using GThinking.N_MISPRO; +using GThinking.N_MODEL.Page; +using GThinking.N_MISPRO.Data; +using GThinking.N_MISPRO.Utility; +using System.Text; +using GThinking.N_CONTROL; + +namespace GThinking.N_XLXSBJ +{ + public partial class BJYF_TLJQJList : SingleGridBase + { + BJYF_TLJQJ entity = new BJYF_TLJQJ(); + BJYF_TLJQJ_M qryEntity = new BJYF_TLJQJ_M(); + + protected void Page_Load(object sender, EventArgs e) + { + this.UMID = 100860173; + this.UMName = "按运距铜铝价区间维护运费比例"; + this.CurMaster = Master; + this.ModuleGV = grdContentGrid; + this.CurEntity = entity; + this.CurQueryEntity = qryEntity; + this.sURLTarget = "BJYF_TLJQJInfo.aspx"; + this.sQueryURLTarget = "BJYF_TLJQJQuery.aspx"; + this.PageHeight = 600; + this.PageWidth = 750; + base.DataKeyNames = new string[] { "XLXSBJDQYFB_XZQHID" }; + Master.EnableCopyBtn = false; + + base.InitPage(); + + if (!IsPostBack) + { + Master_OnStandardQuery(null, null); + } + } + + #region 模板事件 + protected override void Master_OnStandardQuery(object sender, EventArgs e) + { + base.InitEntityByCondition(); + InitGridView(); + entity.EntityTable.QuerySelSql = GetSql(); + base.Master_OnStandardQuery(sender, e); + entity.GridDataBind(grdContentGrid, tSession); + } + + protected override void moduleGV_PageIndexChanging(object sender, GridViewPageEventArgs e) + { + base.InitEntityByCondition(); + InitGridView(); + entity.EntityTable.QuerySelSql = GetSql(); + base.moduleGV_PageIndexChanging(sender, e); + grdContentGrid.SelectedIndex = -1; + } + + protected override void moduleGV_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + LinkPageParam.AddString("XLXSBJDQYFB_XZQHID", grdContentGrid.DataKeys[e.Row.RowIndex]["XLXSBJDQYFB_XZQHID"].ToString().Trim()); + LinkPageParam.AddString("YFJZQHList", txtYFJZQHList.Value.Trim()); + } + base.moduleGV_RowDataBound(sender, e); + } + + protected override bool Master_BeforeDeleteAction(object sender, EventArgs e) + { + entity.Param.Add("XLXSBJDQYFB_XZQHID", grdContentGrid.SelectedDataKey["XLXSBJDQYFB_XZQHID"].ToString().Trim()); + return base.Master_BeforeDeleteAction(sender, e); + } + + protected override void AfterDelete(TDatabase db, ref bool ActionIsDone) + { + string sXZQHID = grdContentGrid.SelectedDataKey["XLXSBJDQYFB_XZQHID"].ToString().Trim(); + string[] sYFJZQHs = txtYFJZQHList.Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + if (sYFJZQHs.Length > 0) + { + string sIn = "'" + string.Join("','", sYFJZQHs) + "'"; + db.ExecSQL(string.Format("delete from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID='{0}' and XLXSBJDQYFB_YFJZQH in ({1})", sXZQHID, sIn)); + } + ActionIsDone = true; + base.AfterDelete(db, ref ActionIsDone); + } + + protected override bool Master_AfterDeleteAction(object sender, EventArgs e) + { + if (!base.Master_AfterDeleteAction(sender, e)) + { return false; } + base.InitEntityByCondition(); + InitGridView(); + entity.EntityTable.QuerySelSql = GetSql(); + entity.GridDataBind(grdContentGrid, tSession); + grdContentGrid.SelectedIndex = -1; + return true; + } + #endregion + + protected void btnYFJZQJ_Click(object sender, EventArgs e) + { + TPageParams tpp = new TPageParams(); + tpp.UrlPath = "BJYFJZQJList.aspx"; + tpp.AddString("YFJSFS", "6"); + OpenModuleDialog(100860071, tpp, btnRefresh.ClientID); + } + + protected void btnRefresh_Click(object sender, EventArgs e) + { + moduleGV_PageIndexChanging(null, null); + } + + + protected void btnDR_Click(object sender, EventArgs e) + { + TPageParams tpp = new TPageParams(); + tpp.UrlPath = "BJYFDRInfo.aspx"; + tpp.AddString("YFJSFS", "6"); + OpenDialog(tpp); + } + + + #region 自定义函数 + private string GetSql() + { + string[] sYFJZQHs = txtYFJZQHList.Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + StringBuilder strSQL = new StringBuilder(); + strSQL.AppendLine(" select A.XZQH_XZQHID as XLXSBJDQYFB_XZQHID,"); + strSQL.AppendLine(" isnull(A.XZQH_PROVINCE,'') as XZQH_PROVINCE,"); + strSQL.AppendLine(" isnull(A.XZQH_CITY,'') as XZQH_CITY,"); + for (int i = 0; i < sYFJZQHs.Length; i++) + { + strSQL.AppendLine(string.Format(" isnull(sum(case when B.XLXSBJDQYFB_YFJZQH='{0}' then B.XLXSBJDQYFB_YSFL else 0 end),0) as YL_{0},", sYFJZQHs[i].Trim())); + } + strSQL.AppendLine(" max(B.XLXSBJDQYFB_WHR) as XLXSBJDQYFB_WHR,"); + strSQL.AppendLine(" max(B.XLXSBJDQYFB_WHSJ) as XLXSBJDQYFB_WHSJ"); + strSQL.AppendLine(" from XZQH A"); + strSQL.AppendLine(" left join XLXSBJDQYFB B on B.XLXSBJDQYFB_XZQHID = A.XZQH_XZQHID"); + if (sYFJZQHs.Length > 0) + { + string sIn = "'" + string.Join("','", sYFJZQHs) + "'"; + strSQL.AppendLine(" and B.XLXSBJDQYFB_YFJZQH in (" + sIn + ")"); + strSQL.AppendLine(" where exists(select 1 from XLXSBJDQYFB where XLXSBJDQYFB_XZQHID = A.XZQH_XZQHID and XLXSBJDQYFB_YFJZQH in (" + sIn + "))"); + } + else + { + strSQL.AppendLine(" where 1<>1"); + } + strSQL.AppendLine(" group by A.XZQH_XZQHID, A.XZQH_PROVINCE, A.XZQH_CITY"); + strSQL.AppendLine(" order by A.XZQH_PROVINCE, A.XZQH_CITY"); + return strSQL.ToString(); + } + + private void InitGridView() + { + // 移除已存在的动态列,避免重复添加 + for (int i = grdContentGrid.Columns.Count - 1; i >= 0; i--) + { + BoundField bf = grdContentGrid.Columns[i] as BoundField; + if (bf != null && bf.DataField.StartsWith("YL_")) + { + grdContentGrid.Columns.RemoveAt(i); + } + } + for (int i = grdContentGrid.ColumnsEx.Count - 1; i >= 0; i--) + { + if (grdContentGrid.ColumnsEx[i].DataField.StartsWith("YL_")) + { + grdContentGrid.ColumnsEx.RemoveAt(i); + } + } + + TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); + TSQL SQL = new TSQL(dberp); + SQL.Clear(); + SQL.Add("select XLXSBJYFJZQJ_YFJZQH, XLXSBJYFJZQJ_YFJZQJMC "); + SQL.Add(" from XLXSBJYFJZQJ"); + SQL.Add(" where XLXSBJYFJZQJ_YFJSGS = '6'"); + SQL.Add(" order by XLXSBJYFJZQJ_YFJZQH"); + DataSet ds = dberp.OpenDataSet(SQL); + + StringBuilder sbYFJZQH = new StringBuilder(); + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + string sYFJZQH = ds.Tables[0].Rows[i]["XLXSBJYFJZQJ_YFJZQH"].ToString().Trim(); + string sYFJZQJMC = ds.Tables[0].Rows[i]["XLXSBJYFJZQJ_YFJZQJMC"].ToString().Trim(); + if (sbYFJZQH.Length > 0) + sbYFJZQH.Append(","); + sbYFJZQH.Append(sYFJZQH); + AddColumn("YL_" + sYFJZQH, sYFJZQJMC, 2, 120); + } + txtYFJZQHList.Value = sbYFJZQH.ToString(); + } + + private void AddColumn(string sDataField, string HeadText, int NumberDecimalPlace, int Width) + { + BoundField Column = new BoundField(); + Column.DataField = sDataField; + Column.HeaderText = HeadText; + Column.ItemStyle.Width = (Unit)Width; + Column.HeaderStyle.Width = (Unit)Width; + Column.ItemStyle.HorizontalAlign = HorizontalAlign.Right; + grdContentGrid.Columns.Add(Column); + + gtGridView_Column ColumnEx = new gtGridView_Column(); + ColumnEx.DataField = sDataField; + ColumnEx.EditType = TEditType.etNumber; + ColumnEx.ShowHint = true; + ColumnEx.NumberDecimalPlace = NumberDecimalPlace; + grdContentGrid.ColumnsEx.Add(ColumnEx); + } + #endregion + } +} diff --git a/BJYF_TLJQJList.aspx.designer.cs b/BJYF_TLJQJList.aspx.designer.cs new file mode 100644 index 0000000..1a71b4d --- /dev/null +++ b/BJYF_TLJQJList.aspx.designer.cs @@ -0,0 +1,88 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:2.0.50727.9179 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace GThinking.N_XLXSBJ { + + + /// + /// BJYF_TLJQJList 类。 + /// + /// + /// 自动生成的类。 + /// + public partial class BJYF_TLJQJList { + + /// + /// CustomButton 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Table CustomButton; + + /// + /// btnYFJZQJ 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtToolButton btnYFJZQJ; + + /// + /// btnDR 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtToolButton btnDR; + + /// + /// btnRefresh 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtButton btnRefresh; + + /// + /// grdContentGrid 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtGridView grdContentGrid; + + /// + /// txtYFJZQHList 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.HiddenField txtYFJZQHList; + + /// + /// Master 属性。 + /// + /// + /// 自动生成的属性。 + /// + public new GThinking.N_MODEL.Page.MasterSingleGrid Master { + get { + return ((GThinking.N_MODEL.Page.MasterSingleGrid)(base.Master)); + } + } + } +} diff --git a/BJYF_TLJQJQuery.aspx b/BJYF_TLJQJQuery.aspx new file mode 100644 index 0000000..e5755f9 --- /dev/null +++ b/BJYF_TLJQJQuery.aspx @@ -0,0 +1,8 @@ +<%@ Page Language="C#" MasterPageFile="~/N_MODEL/Page/MasterSingleQuery.Master" AutoEventWireup="true" + Codebehind="BJYF_TLJQJQuery.aspx.cs" Inherits="GThinking.N_XLXSBJ.BJYF_TLJQJQuery" Title="按运距铜铝价区间维护运费比例" %> + +<%@ MasterType VirtualPath="~/N_MODEL/Page/MasterSingleQuery.Master" %> + + + + diff --git a/BJYF_TLJQJQuery.aspx.cs b/BJYF_TLJQJQuery.aspx.cs new file mode 100644 index 0000000..dce61a1 --- /dev/null +++ b/BJYF_TLJQJQuery.aspx.cs @@ -0,0 +1,30 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using GThinking.N_MODEL.Page; + +namespace GThinking.N_XLXSBJ +{ + public partial class BJYF_TLJQJQuery : SingleQueryBase + { + BJYF_TLJQJ_M qryEntity = new BJYF_TLJQJ_M(); + + protected void Page_Load(object sender, EventArgs e) + { + this.UMID = 100860173; + this.UMName = "按运距铜铝价区间维护运费比例"; + this.CurMaster = Master; + this.CurQueryTable = QueryTable; + this.CurQueryEntity = qryEntity; + + base.InitPage(); + } + } +} diff --git a/BJYF_TLJQJQuery.aspx.designer.cs b/BJYF_TLJQJQuery.aspx.designer.cs new file mode 100644 index 0000000..17b1e00 --- /dev/null +++ b/BJYF_TLJQJQuery.aspx.designer.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:2.0.50727.9179 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace GThinking.N_XLXSBJ { + + + /// + /// BJYF_TLJQJQuery 类。 + /// + /// + /// 自动生成的类。 + /// + public partial class BJYF_TLJQJQuery { + + /// + /// QueryTable 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Table QueryTable; + + /// + /// Master 属性。 + /// + /// + /// 自动生成的属性。 + /// + public new GThinking.N_MODEL.Page.MasterSingleQuery Master { + get { + return ((GThinking.N_MODEL.Page.MasterSingleQuery)(base.Master)); + } + } + } +} diff --git a/BJYF_TLJQJ_M.cs b/BJYF_TLJQJ_M.cs new file mode 100644 index 0000000..c524e1d --- /dev/null +++ b/BJYF_TLJQJ_M.cs @@ -0,0 +1,21 @@ +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using GThinking.N_MODEL.Page; + +namespace GThinking.N_XLXSBJ +{ + public class BJYF_TLJQJ_M : TBaseNamedQuery + { + public BJYF_TLJQJ_M() + { + } + + } +} diff --git a/CLQDYZInfo.aspx b/CLQDYZInfo.aspx index b73faa1..491633d 100644 --- a/CLQDYZInfo.aspx +++ b/CLQDYZInfo.aspx @@ -148,6 +148,96 @@ + + + + + 调价因子11: + + + + + + + + + 调价因子12: + + + + + + + + + 调价因子13: + + + + + + + + + 调价因子14: + + + + + + + + + 调价因子15: + + + + + + + + + 调价因子16: + + + + + + + + + 调价因子17: + + + + + + + + + 调价因子18: + + + + + + + + + 调价因子19: + + + + + + + + + 调价因子20: + + + + diff --git a/CLQDYZInfo.aspx.cs b/CLQDYZInfo.aspx.cs index 679fdfc..62f9069 100644 --- a/CLQDYZInfo.aspx.cs +++ b/CLQDYZInfo.aspx.cs @@ -428,65 +428,27 @@ namespace GThinking.N_XLXSBJ sql.ParamByName("pWHRID").Value = tSession.UserId; sql.ParamByName("pWHSJ").Value = tNow; - if (sTJYZList[i].StartsWith("JZ01|")) + string item = sTJYZList[i]; + if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|') { - sql.ParamByName("pYZID").Value = "JZ01"; - sql.ParamByName("pYZZ").Value = txtTJYZ1.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ02|")) - { - sql.ParamByName("pYZID").Value = "JZ02"; - sql.ParamByName("pYZZ").Value = txtTJYZ2.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ03|")) - { - sql.ParamByName("pYZID").Value = "JZ03"; - sql.ParamByName("pYZZ").Value = txtTJYZ3.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ04|")) - { - sql.ParamByName("pYZID").Value = "JZ04"; - sql.ParamByName("pYZZ").Value = txtTJYZ4.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ05|")) - { - sql.ParamByName("pYZID").Value = "JZ05"; - sql.ParamByName("pYZZ").Value = txtTJYZ5.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ06|")) - { - sql.ParamByName("pYZID").Value = "JZ06"; - sql.ParamByName("pYZZ").Value = txtTJYZ6.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ07|")) - { - sql.ParamByName("pYZID").Value = "JZ07"; - sql.ParamByName("pYZZ").Value = txtTJYZ7.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ08|")) - { - sql.ParamByName("pYZID").Value = "JZ08"; - sql.ParamByName("pYZZ").Value = txtTJYZ8.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ09|")) - { - sql.ParamByName("pYZID").Value = "JZ09"; - sql.ParamByName("pYZZ").Value = txtTJYZ9.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ10|")) - { - sql.ParamByName("pYZID").Value = "JZ10"; - sql.ParamByName("pYZZ").Value = txtTJYZ10.Value; - dberp.ExecSQL(sql); + string num = item.Substring(2, 2); // ȡ³öÁ½λ±àºţ¬Èç "01" + int index; + if (int.TryParse(num, out index) && index >= 1 && index <= 10) + { + string id = "JZ" + num; // ¹¹Ôì pYZID µÄֵ£¬Èç "JZ01" + sql.ParamByName("pYZID").Value = id; + + // ¸ù¾ݱàºŶ¯̬²éÕҶÔӦµÄÊäÈë¿ؼþ + Control ctrl = FindControl("txtTJYZ" + num); + if (ctrl != null && ctrl is gtNumTextBox) + { + double value = ((gtNumTextBox)ctrl).Value; + sql.ParamByName("pYZZ").Value = value; + dberp.ExecSQL(sql); + } + // ÒòΪһ¸ö sTJYZList[i] ֻ»áƥÅäһ¸ö·Ö֧£¬Õҵ½º󼴿ÉÌø³öµ±ǰԪËصĴ¦Àí + break; + } } } #endregion diff --git a/CLQDYZInfo.aspx.designer.cs b/CLQDYZInfo.aspx.designer.cs index 97f78e3..2edaaca 100644 --- a/CLQDYZInfo.aspx.designer.cs +++ b/CLQDYZInfo.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 此代码由工具生成。 -// 运行时版本:2.0.50727.9174 +// 运行时版本:2.0.50727.9179 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 @@ -289,6 +289,186 @@ namespace GThinking.N_XLXSBJ { /// protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ10; + /// + /// lblTJYZ11 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ11; + + /// + /// txtTJYZ11 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ11; + + /// + /// lblTJYZ12 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ12; + + /// + /// txtTJYZ12 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ12; + + /// + /// lblTJYZ13 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ13; + + /// + /// txtTJYZ13 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ13; + + /// + /// lblTJYZ14 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ14; + + /// + /// txtTJYZ14 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ14; + + /// + /// lblTJYZ15 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ15; + + /// + /// txtTJYZ15 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ15; + + /// + /// lblTJYZ16 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ16; + + /// + /// txtTJYZ16 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ16; + + /// + /// lblTJYZ17 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ17; + + /// + /// txtTJYZ17 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ17; + + /// + /// lblTJYZ18 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ18; + + /// + /// txtTJYZ18 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ18; + + /// + /// lblTJYZ19 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ19; + + /// + /// txtTJYZ19 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ19; + + /// + /// lblTJYZ20 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ20; + + /// + /// txtTJYZ20 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ20; + /// /// GtLabel5 控件。 /// diff --git a/CLYLZDSQ.cs b/CLYLZDSQ.cs index 88c2081..e614a6b 100644 --- a/CLYLZDSQ.cs +++ b/CLYLZDSQ.cs @@ -1308,6 +1308,96 @@ namespace GThinking.N_XLXSBJ set { SetField("JZ10", value); } } + [DataMember(DbField = "JZ11", DbTitle = "JZ11", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ11", + CtlType = FieldType.F)] + public string JZ11 + { + get { return GetField("JZ11").ToString().Trim(); } + set { SetField("JZ11", value); } + } + + [DataMember(DbField = "JZ12", DbTitle = "JZ12", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ12", + CtlType = FieldType.F)] + public string JZ12 + { + get { return GetField("JZ12").ToString().Trim(); } + set { SetField("JZ12", value); } + } + + [DataMember(DbField = "JZ13", DbTitle = "JZ13", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ13", + CtlType = FieldType.F)] + public string JZ13 + { + get { return GetField("JZ13").ToString().Trim(); } + set { SetField("JZ13", value); } + } + + [DataMember(DbField = "JZ14", DbTitle = "JZ14", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ14", + CtlType = FieldType.F)] + public string JZ14 + { + get { return GetField("JZ14").ToString().Trim(); } + set { SetField("JZ14", value); } + } + + [DataMember(DbField = "JZ15", DbTitle = "JZ15", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ15", + CtlType = FieldType.F)] + public string JZ15 + { + get { return GetField("JZ15").ToString().Trim(); } + set { SetField("JZ15", value); } + } + + [DataMember(DbField = "JZ16", DbTitle = "JZ16", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ16", + CtlType = FieldType.F)] + public string JZ16 + { + get { return GetField("JZ16").ToString().Trim(); } + set { SetField("JZ16", value); } + } + + [DataMember(DbField = "JZ17", DbTitle = "JZ17", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ17", + CtlType = FieldType.F)] + public string JZ17 + { + get { return GetField("JZ17").ToString().Trim(); } + set { SetField("JZ17", value); } + } + + [DataMember(DbField = "JZ18", DbTitle = "JZ18", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ18", + CtlType = FieldType.F)] + public string JZ18 + { + get { return GetField("JZ18").ToString().Trim(); } + set { SetField("JZ18", value); } + } + + [DataMember(DbField = "JZ19", DbTitle = "JZ19", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ19", + CtlType = FieldType.F)] + public string JZ19 + { + get { return GetField("JZ19").ToString().Trim(); } + set { SetField("JZ19", value); } + } + + [DataMember(DbField = "JZ20", DbTitle = "JZ20", IsKey = false, DbType = TGtdbType.Float, + Len = 8, IsNullable = true, DefValue = "0", CtlName = "txtJZ20", + CtlType = FieldType.F)] + public string JZ20 + { + get { return GetField("JZ20").ToString().Trim(); } + set { SetField("JZ20", value); } + } + #endregion @@ -1598,6 +1688,96 @@ namespace GThinking.N_XLXSBJ set { SetField("JZ10_TJDH", value); } } + [DataMember(DbField = "JZ11_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ11", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ11_TJDH", + CtlType = FieldType.C)] + public string JZ11_TJDH + { + get { return GetField("JZ11_TJDH").ToString().Trim(); } + set { SetField("JZ11_TJDH", value); } + } + + [DataMember(DbField = "JZ12_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ12", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ12_TJDH", + CtlType = FieldType.C)] + public string JZ12_TJDH + { + get { return GetField("JZ12_TJDH").ToString().Trim(); } + set { SetField("JZ12_TJDH", value); } + } + + [DataMember(DbField = "JZ13_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ13", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ13_TJDH", + CtlType = FieldType.C)] + public string JZ13_TJDH + { + get { return GetField("JZ13_TJDH").ToString().Trim(); } + set { SetField("JZ13_TJDH", value); } + } + + [DataMember(DbField = "JZ14_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ14", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ14_TJDH", + CtlType = FieldType.C)] + public string JZ14_TJDH + { + get { return GetField("JZ14_TJDH").ToString().Trim(); } + set { SetField("JZ14_TJDH", value); } + } + + [DataMember(DbField = "JZ15_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ15", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ15_TJDH", + CtlType = FieldType.C)] + public string JZ15_TJDH + { + get { return GetField("JZ15_TJDH").ToString().Trim(); } + set { SetField("JZ15_TJDH", value); } + } + + [DataMember(DbField = "JZ16_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ16", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ16_TJDH", + CtlType = FieldType.C)] + public string JZ16_TJDH + { + get { return GetField("JZ16_TJDH").ToString().Trim(); } + set { SetField("JZ16_TJDH", value); } + } + + [DataMember(DbField = "JZ17_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ17", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ17_TJDH", + CtlType = FieldType.C)] + public string JZ17_TJDH + { + get { return GetField("JZ17_TJDH").ToString().Trim(); } + set { SetField("JZ17_TJDH", value); } + } + + [DataMember(DbField = "JZ18_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ18", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ18_TJDH", + CtlType = FieldType.C)] + public string JZ18_TJDH + { + get { return GetField("JZ18_TJDH").ToString().Trim(); } + set { SetField("JZ18_TJDH", value); } + } + + [DataMember(DbField = "JZ19_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ19", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ19_TJDH", + CtlType = FieldType.C)] + public string JZ19_TJDH + { + get { return GetField("JZ19_TJDH").ToString().Trim(); } + set { SetField("JZ19_TJDH", value); } + } + + [DataMember(DbField = "JZ20_TJDH", DbTitle = "µ÷¼۵¥ºÅJZ20", IsKey = false, DbType = TGtdbType.VarChar, + Len = 10, IsNullable = true, DefValue = "", CtlName = "txtJZ20_TJDH", + CtlType = FieldType.C)] + public string JZ20_TJDH + { + get { return GetField("JZ20_TJDH").ToString().Trim(); } + set { SetField("JZ20_TJDH", value); } + } + #endregion [DataMember(DbField = "XLXSBJYLZDMX_YZZWSZ", DbTitle = "Òò×ÓֵδÉèÖÃ", IsKey = false, DbType = TGtdbType.VarChar, @@ -1708,7 +1888,7 @@ namespace GThinking.N_XLXSBJ } } - for (int i = 1; i <= 10; i++) + for (int i = 1; i <= 20; i++) { string sYZID = "JZ" + i.ToString().PadLeft(2, '0'); if (!YZDIC.ContainsKey(sYZID)) diff --git a/CX_JGBMXList.aspx.cs b/CX_JGBMXList.aspx.cs index b7ca152..ff807c9 100644 --- a/CX_JGBMXList.aspx.cs +++ b/CX_JGBMXList.aspx.cs @@ -149,9 +149,14 @@ namespace GThinking.N_XLXSBJ { sSQL.AppendLine("select XLXSJGBMX_JGBID,XLXSJGBMX_XH,XLXSJGBMX_XLXHID,XLXSJGBMX_XLGGID,XLXSJGBMX_XLBZID,XLXSJGBMX_DYDJID,"); sSQL.AppendLine(" XLXSJGBMX_YXQS,XLXSJGBMX_YXQZ,XLXSJGBMX_HSJJ,XLXSJGBMX_HSBJ,XLXSJGBMX_WSBJ,XLXSJGBMX_BZ,XLXSJGBMX_WHR,XLXSJGBMX_WHRID,XLXSJGBMX_WHSJ,XLXSJGBMX_XLBZID || '|' || XLBZ_XLBZLXMC as XLBZ "); + + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); // ¸ñʽ»¯ΪÁ½λÊý×֣º01, 02, ... 20 + sSQL.AppendFormat(",XLXSJGBYZZ0_YZZ{0} as TZYZ_JZ{0}", num); + + } - sSQL.AppendLine(" ,XLXSJGBYZZ0_YZZ01 as TZYZ_JZ01,XLXSJGBYZZ0_YZZ02 as TZYZ_JZ02,XLXSJGBYZZ0_YZZ03 as TZYZ_JZ03,XLXSJGBYZZ0_YZZ04 as TZYZ_JZ04,XLXSJGBYZZ0_YZZ05 as TZYZ_JZ05 "); - sSQL.AppendLine(" ,XLXSJGBYZZ0_YZZ06 as TZYZ_JZ06,XLXSJGBYZZ0_YZZ07 as TZYZ_JZ07,XLXSJGBYZZ0_YZZ08 as TZYZ_JZ08,XLXSJGBYZZ0_YZZ09 as TZYZ_JZ09,XLXSJGBYZZ0_YZZ10 as TZYZ_JZ10 "); sSQL.AppendLine(" from XLXSJGBMX "); sSQL.AppendLine(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID=XLXSJGBMX_JGBID and XLXSJGBYZZ0_XH=XLXSJGBMX_XH "); } diff --git a/DRXLXHCPTXWH.aspx.cs b/DRXLXHCPTXWH.aspx.cs index c9a42e9..4cde7c2 100644 --- a/DRXLXHCPTXWH.aspx.cs +++ b/DRXLXHCPTXWH.aspx.cs @@ -125,6 +125,7 @@ namespace GThinking.N_XLXSBJ { string sXLXHID = ds.Tables[0].Rows[i][0].ToString().Trim(); string sDYDJID = ds.Tables[0].Rows[i][1].ToString().Trim(); + string sZXJM = ds.Tables[0].Rows[i][2].ToString().Trim(); #region 校验数据 @@ -136,9 +137,12 @@ namespace GThinking.N_XLXSBJ if (sDYDJID.Equals("")) sDYDJID = " "; + if (sZXJM.Equals("")) + sZXJM = " "; + #endregion - string sSQL = string.Format("delete from XLXSBJCPYS where XLXSBJCPYS_XLJBXHID='{0}' and XLXSBJCPYS_DYDJID='{1}'", sXLXHID, sDYDJID); + string sSQL = string.Format("delete from XLXSBJCPYS where XLXSBJCPYS_XLJBXHID='{0}' and XLXSBJCPYS_DYDJID='{1}' and ,XLXSBJCPYS_XLYSID='{2}' ", sXLXHID, sDYDJID,sZXJM); SQL.Clear(); SQL.Add(sSQL); @@ -147,7 +151,8 @@ namespace GThinking.N_XLXSBJ #region 按矩阵列生成属性记录 string sXLTXID = string.Empty; - for (int j = 2; j < ds.Tables[0].Columns.Count; j++) + int XH = 1; + for (int j = 3; j < ds.Tables[0].Columns.Count; j++) { object objValue = ds.Tables[0].Rows[i][j]; if (objValue == null || objValue == DBNull.Value) @@ -162,12 +167,13 @@ namespace GThinking.N_XLXSBJ if (sCellValue.Equals("")) continue; - int XH = 1; + SQL.Clear(); - SQL.Add(@" insert into XLXSBJCPYS(XLXSBJCPYS_CPYT, XLXSBJCPYS_XLJBXHID, XLXSBJCPYS_DYDJID,XLXSBJCPYS_XXJGID,XLXSBJCPYS_WHR,XLXSBJCPYS_WHRID,XLXSBJCPYS_WHSJ) - values(:XLXSBJCPYS_CPYT,:XLXSBJCPYS_XLJBXHID,:XLXSBJCPYS_DYDJID,:XLXSBJCPYS_XXJGID,:XLXSBJCPYS_WHR,:XLXSBJCPYS_WHRID,:XLXSBJCPYS_WHSJ)"); + SQL.Add(@" insert into XLXSBJCPYS(XLXSBJCPYS_CPYT, XLXSBJCPYS_XLJBXHID,XLXSBJCPYS_XLYSID, XLXSBJCPYS_DYDJID,XLXSBJCPYS_XXJGID,XLXSBJCPYS_WHR,XLXSBJCPYS_WHRID,XLXSBJCPYS_WHSJ) + values(:XLXSBJCPYS_CPYT,:XLXSBJCPYS_XLJBXHID,:XLXSBJCPYS_XLYSID,:XLXSBJCPYS_DYDJID,:XLXSBJCPYS_XXJGID,:XLXSBJCPYS_WHR,:XLXSBJCPYS_WHRID,:XLXSBJCPYS_WHSJ)"); SQL.ParamByName("XLXSBJCPYS_XLJBXHID").Value = sXLXHID; SQL.ParamByName("XLXSBJCPYS_DYDJID").Value = sDYDJID; + SQL.ParamByName("XLXSBJCPYS_XLYSID").Value = sZXJM; SQL.ParamByName("XLXSBJCPYS_XXJGID").Value = sXLXHFJSX; SQL.ParamByName("XLXSBJCPYS_CPYT").Value = XH++; SQL.ParamByName("XLXSBJCPYS_WHR").Value = tSession.UserName; @@ -196,9 +202,9 @@ namespace GThinking.N_XLXSBJ private void ExcelColumnValid(DataSet ds) { - if (ds.Tables[0].Columns.Count < 3) + if (ds.Tables[0].Columns.Count < 4) { - throw new Exception("Excel 列数不正确,至少需要包含“型号”、“电压等级”列和一列属性列!"); + throw new Exception("Excel 列数不正确,至少需要包含“型号”、“电压等级”、“主芯截面”列和一列属性列!"); } if (!ds.Tables[0].Columns[0].ColumnName.Trim().Equals("型号")) @@ -210,6 +216,11 @@ namespace GThinking.N_XLXSBJ { throw new Exception(string.Format("第 2 列标题错误,当前为({0}),应为(电压等级)", ds.Tables[0].Columns[0].ColumnName.Trim())); } + + if (!ds.Tables[0].Columns[2].ColumnName.Trim().Equals("主芯截面")) + { + throw new Exception(string.Format("第 3 列标题错误,当前为({0}),应为(主芯截面)", ds.Tables[0].Columns[0].ColumnName.Trim())); + } } private void ReadWJ(string sPath, ref DataSet aDataExcel) diff --git a/JGBMLInfo.aspx.cs b/JGBMLInfo.aspx.cs index 7d5776f..c557387 100644 --- a/JGBMLInfo.aspx.cs +++ b/JGBMLInfo.aspx.cs @@ -715,10 +715,21 @@ namespace GThinking.N_XLXSBJ //ͬ²½¸´ÖÆXLXSJGBYZZ0 SQL.Clear(); - SQL.Add("insert into XLXSJGBYZZ0(XLXSJGBYZZ0_JGBID,XLXSJGBYZZ0_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,"); - SQL.Add(" XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10)"); - SQL.Add(" select :pJGBID,XLXSJGBYZZ0_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05, "); - SQL.Add(" XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + SQL.Add("insert into XLXSJGBYZZ0(XLXSJGBYZZ0_JGBID,XLXSJGBYZZ0_XH"); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); // ¸ñʽ»¯ΪÁ½λÊý×֣º01, 02, ... 20 + SQL.Add(string.Format(",XLXSJGBYZZ0_YZZ{0}", num)); + + } + SQL.Add(" ) "); + SQL.Add(" select :pJGBID,XLXSJGBYZZ0_XH "); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); // ¸ñʽ»¯ΪÁ½λÊý×֣º01, 02, ... 20 + SQL.Add(string.Format(",XLXSJGBYZZ0_YZZ{0}", num)); + + } SQL.Add(" from XLXSJGBYZZ0 "); SQL.Add(" where XLXSJGBYZZ0_JGBID=:pbeforeJGBID "); SQL.ParamByName("pJGBID").Value = txtJGBID.Text.Trim(); @@ -802,11 +813,23 @@ namespace GThinking.N_XLXSBJ dberp.ExecSQL(SQL); //ͬ²½¸´ÖÆXLXSJGBYZZ0 + SQL.Clear(); - SQL.Add("insert into XLXSJGBYZZ0(XLXSJGBYZZ0_JGBID,XLXSJGBYZZ0_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,"); - SQL.Add(" XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10)"); - SQL.Add(" select :pJGBID,XLXSJGBYZZ0_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05, "); - SQL.Add(" XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + SQL.Add("insert into XLXSJGBYZZ0(XLXSJGBYZZ0_JGBID,XLXSJGBYZZ0_XH"); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); // ¸ñʽ»¯ΪÁ½λÊý×֣º01, 02, ... 20 + SQL.Add(string.Format(",XLXSJGBYZZ0_YZZ{0}", num)); + + } + SQL.Add(" ) "); + SQL.Add(" select :pJGBID,XLXSJGBYZZ0_XH "); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); // ¸ñʽ»¯ΪÁ½λÊý×֣º01, 02, ... 20 + SQL.Add(string.Format(",XLXSJGBYZZ0_YZZ{0}", num)); + + } SQL.Add(" from XLXSJGBYZZ0 "); SQL.Add(" where XLXSJGBYZZ0_JGBID=:pbeforeJGBID "); SQL.ParamByName("pJGBID").Value = txtJGBID.Text.Trim(); diff --git a/MAC8.cs b/MAC8.cs index 7f31c8d..6832f71 100644 --- a/MAC8.cs +++ b/MAC8.cs @@ -203,6 +203,7 @@ namespace GThinking.N_XLXSBJ AddModuleInfo(100860165, 0, "按主芯截面范围调表价", "F", "TZYZJJBList.aspx"); AddModuleInfo(100860166, 0, "按产品特性调表价", "F", "TZYZJJCList.aspx"); //AddModuleInfo(100860167, 0, "线缆型号附加属性维护", "F", "XLXHCPTXWHList.aspx"); + AddModuleInfo(100860173, 0, "按运距铜铝价区间维护运费比例", "F", "BJYF_TLJQJList.aspx"); } } diff --git a/N_XLXSBJA.csproj b/N_XLXSBJA.csproj index 04eb285..63967df 100644 --- a/N_XLXSBJA.csproj +++ b/N_XLXSBJA.csproj @@ -1,4 +1,4 @@ - + Debug AnyCPU @@ -92,6 +92,9 @@ + + + @@ -643,6 +646,29 @@ BJYFDRInfo.aspx + + + BJYF_TLJQJInfo.aspx + ASPXCodeBehind + + + BJYF_TLJQJInfo.aspx + + + BJYF_TLJQJList.aspx + ASPXCodeBehind + + + BJYF_TLJQJList.aspx + + + BJYF_TLJQJQuery.aspx + ASPXCodeBehind + + + BJYF_TLJQJQuery.aspx + + BJYF_YZYJTJInfo.aspx ASPXCodeBehind diff --git a/N_XLXSBJA.suo b/N_XLXSBJA.suo index f377c17..b45d073 100644 Binary files a/N_XLXSBJA.suo and b/N_XLXSBJA.suo differ diff --git a/TZYZJJ2.cs b/TZYZJJ2.cs index 6d60e3c..cd567c2 100644 --- a/TZYZJJ2.cs +++ b/TZYZJJ2.cs @@ -33,24 +33,22 @@ DeleteSql = " delete from XLXSJGBYZZ2 where XLXSJGBYZZ2_JGBID=:XLXSJGBYZZ2_JGBID { TSQL SQL = base.SetQuerySql(); SQL.Add("select XLXSBJCL_BJCLID,XLXSBJCL_BJCLMC,"); - SQL.Add("isnull(TZYZ_JZ01,0) as TZYZ_JZ01,isnull(TZYZ_JZ02,0) as TZYZ_JZ02,isnull(TZYZ_JZ03,0) as TZYZ_JZ03,"); - SQL.Add("isnull(TZYZ_JZ04,0) as TZYZ_JZ04,isnull(TZYZ_JZ05,0) as TZYZ_JZ05,isnull(TZYZ_JZ06,0) as TZYZ_JZ06,"); - SQL.Add("isnull(TZYZ_JZ07,0) as TZYZ_JZ07,isnull(TZYZ_JZ08,0) as TZYZ_JZ08,isnull(TZYZ_JZ09,0) as TZYZ_JZ09,"); - SQL.Add("isnull(TZYZ_JZ10,0) as TZYZ_JZ10 "); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); + SQL.Add(string.Format("isnull(TZYZ_JZ{0},0) as TZYZ_JZ{0}", num)); + if (i < 20) SQL.Add(","); + } SQL.Add(" from XLXSBJCL"); SQL.Add(" left join"); SQL.Add(" ("); SQL.Add(" select XLXSJGBYZZ2_BJCLID,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ01' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ01,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ02' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ02,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ03' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ03,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ04' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ04,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ05' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ05,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ06' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ06,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ07' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ07,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ08' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ08,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ09' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ09,"); - SQL.Add(" sum(case XLXSJGBYZZ2_YZID when 'JZ10' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ10 "); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); + SQL.Add(string.Format(" sum(case XLXSJGBYZZ2_YZID when 'JZ{0}' then XLXSJGBYZZ2_YZZ else 0 end) as TZYZ_JZ{0}", num)); + if (i < 20) SQL.Add(","); + } SQL.Add(" from XLXSJGBYZZ2"); SQL.Add(" where XLXSJGBYZZ2_JGBID=:pJGBID and XLXSJGBYZZ2_CPYT=:pCPYT and XLXSJGBYZZ2_DYDJFL=:pDYDJFL and XLXSJGBYZZ2_DTCLID=:pDTCLID "); SQL.Add(" group by XLXSJGBYZZ2_BJCLID"); diff --git a/TZYZJJ2Info.aspx b/TZYZJJ2Info.aspx index b218028..d7cdad4 100644 --- a/TZYZJJ2Info.aspx +++ b/TZYZJJ2Info.aspx @@ -87,6 +87,26 @@ Width="100px"> + + + + + + + + + + diff --git a/TZYZJJ2Info.aspx.cs b/TZYZJJ2Info.aspx.cs index e474b05..c6fb069 100644 --- a/TZYZJJ2Info.aspx.cs +++ b/TZYZJJ2Info.aspx.cs @@ -349,91 +349,38 @@ namespace GThinking.N_XLXSBJ private void InitGrdColumn() { - grdSHD.FindColumnByFieldName("TZYZ_JZ01").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ02").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ03").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ04").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ05").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ06").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ07").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ08").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ09").Visible = false; - grdSHD.FindColumnByFieldName("TZYZ_JZ10").Visible = false; + for (int i = 1; i <= 20; i++) + { + string fieldName = "TZYZ_JZ" + i.ToString("D2"); + gtAjaxGridViewColumn col = grdSHD.FindColumnByFieldName(fieldName); + if (col != null) + { + col.Visible = false; + } + } string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(','); for (int i = 0; i < sTJYZList.Length; i++) { - if (sTJYZList[i].StartsWith("JZ01|")) + string item = sTJYZList[i]; + + // ¼ì²éÊǷñÒÔ "JZ" + Á½λÊý×Ö + "|" ¿ªͷ + if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|') { - grdSHD.FindColumnByFieldName("TZYZ_JZ01").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ01").HeaderText = sTJYZList[i].Replace("JZ01|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ01").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ02|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ02").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ02").HeaderText = sTJYZList[i].Replace("JZ02|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ02").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ03|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ03").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ03").HeaderText = sTJYZList[i].Replace("JZ03|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ03").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ04|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ04").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ04").HeaderText = sTJYZList[i].Replace("JZ04|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ04").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ05|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ05").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ05").HeaderText = sTJYZList[i].Replace("JZ05|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ05").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ06|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ06").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ06").HeaderText = sTJYZList[i].Replace("JZ06|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ06").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ07|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ07").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ07").HeaderText = sTJYZList[i].Replace("JZ07|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ07").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ08|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ08").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ08").HeaderText = sTJYZList[i].Replace("JZ08|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ08").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ09|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ09").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ09").HeaderText = sTJYZList[i].Replace("JZ09|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ09").NumberDecimalPlace = 5; - } - else if (sTJYZList[i].StartsWith("JZ10|")) - { - grdSHD.FindColumnByFieldName("TZYZ_JZ10").Visible = true; - grdSHD.FindColumnByFieldName("TZYZ_JZ10").HeaderText = sTJYZList[i].Replace("JZ10|", ""); - if (sTJYZList[i].EndsWith("(Ԫ)")) - grdSHD.FindColumnByFieldName("TZYZ_JZ10").NumberDecimalPlace = 5; + string num = item.Substring(2, 2); // Ìáȡ "01" ~ "10" + string fieldName = "TZYZ_JZ" + num; // ¹¹ÔìÁÐÃû + + gtAjaxGridViewColumn col = grdSHD.FindColumnByFieldName(fieldName); + if (col != null) + { + col.Visible = true; + col.HeaderText = item.Substring(5); // ȥµô "JZxx|" ǰ׺ + if (item.EndsWith("(Ԫ)")) + col.NumberDecimalPlace = 5; + } } } + } private void InsertXLXSJGBYZZ2(TDatabase dberp) diff --git a/TZYZJJ2Info.aspx.designer.cs b/TZYZJJ2Info.aspx.designer.cs index 3de99a2..7251ea0 100644 --- a/TZYZJJ2Info.aspx.designer.cs +++ b/TZYZJJ2Info.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 此代码由工具生成。 -// 运行时版本:2.0.50727.9151 +// 运行时版本:2.0.50727.9179 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 diff --git a/TZYZJJ3Info.aspx b/TZYZJJ3Info.aspx index ec814da..710c564 100644 --- a/TZYZJJ3Info.aspx +++ b/TZYZJJ3Info.aspx @@ -140,7 +140,96 @@ - + + + + 调价因子11: + + + + + + + + + 调价因子12: + + + + + + + + + 调价因子13: + + + + + + + + + 调价因子14: + + + + + + + + + 调价因子15: + + + + + + + + + 调价因子16: + + + + + + + + + 调价因子17: + + + + + + + + + 调价因子18: + + + + + + + + + 调价因子19: + + + + + + + + + 调价因子20: + + + + + diff --git a/TZYZJJ3Info.aspx.cs b/TZYZJJ3Info.aspx.cs index 520dabb..5fc0f2d 100644 --- a/TZYZJJ3Info.aspx.cs +++ b/TZYZJJ3Info.aspx.cs @@ -14,6 +14,7 @@ using GThinking.N_MODEL.Page; using GThinking.N_MISPRO.Utility; using GThinking.N_PUBLIC; using GThinking.N_MODEL.Dialog; +using GThinking.N_CONTROL; namespace GThinking.N_XLXSBJ { @@ -86,64 +87,41 @@ namespace GThinking.N_XLXSBJ datWHSJ.Enabled = false; # region ¸øµ÷¼ÛÒò×ӿؼþÉèֻ¶ÁÐÔ + if (ControlState == TControlState.ctsInsert || ControlState == TControlState.ctsCopy || ControlState == TControlState.ctsEdit) { - txtTJYZ1.Enabled = false; - txtTJYZ2.Enabled = false; - txtTJYZ3.Enabled = false; - txtTJYZ4.Enabled = false; - txtTJYZ5.Enabled = false; - txtTJYZ6.Enabled = false; - txtTJYZ7.Enabled = false; - txtTJYZ8.Enabled = false; - txtTJYZ9.Enabled = false; - txtTJYZ10.Enabled = false; - - string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(','); - for (int i = 0; i < sTJYZList.Length; i++) + // 1. ÏȽûÓÃËùÓÐ txtTJYZ1 ~ txtTJYZ10 + for (int i = 1; i <= 20; i++) { - if (sTJYZList[i].StartsWith("JZ01|")) + gtNumTextBox txt = FindControl("txtTJYZ" + i) as gtNumTextBox; + if (txt != null) { - txtTJYZ1.Enabled = true; + txt.Enabled = false; } - else if (sTJYZList[i].StartsWith("JZ02|")) + } + + // 2. ½âÎö TJYZList£¬ÆôÓÃƥÅäµĿؼþ + string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(','); + foreach (string item in sTJYZList) + { + // ¼ì²é¸ñʽ£ºÒÔ "JZ" + Á½λÊý×Ö + "|" ¿ªͷ + if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|') { - txtTJYZ2.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ03|")) - { - txtTJYZ3.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ04|")) - { - txtTJYZ4.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ05|")) - { - txtTJYZ5.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ06|")) - { - txtTJYZ6.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ07|")) - { - txtTJYZ7.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ08|")) - { - txtTJYZ8.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ09|")) - { - txtTJYZ9.Enabled = true; - } - else if (sTJYZList[i].StartsWith("JZ10|")) - { - txtTJYZ10.Enabled = true; + string numStr = item.Substring(2, 2); // Ìáȡ "01" ~ "10" + int index; + if (int.TryParse(numStr, out index)) + { + // עÒâ¿ؼþID²»´øǰµ¼Á㣬Èç "txtTJYZ1" + gtNumTextBox txt = FindControl("txtTJYZ" + index) as gtNumTextBox; + if (txt != null) + { + txt.Enabled = true; + } + } } } } + #endregion } @@ -192,26 +170,21 @@ namespace GThinking.N_XLXSBJ double dYZZ = CMISproConvert.StrToFloat(ds.Tables[0].Rows[i]["XLXSJGBYZZ3_YZZ"].ToString().Trim()); if (PageParam.GetRTrimString("TJYZList").Contains(sYZID + "|")) { - if (sYZID.Equals("JZ01")) - txtTJYZ1.Value = dYZZ; - else if (sYZID.Equals("JZ02")) - txtTJYZ2.Value = dYZZ; - else if (sYZID.Equals("JZ03")) - txtTJYZ3.Value = dYZZ; - else if (sYZID.Equals("JZ04")) - txtTJYZ4.Value = dYZZ; - else if (sYZID.Equals("JZ05")) - txtTJYZ5.Value = dYZZ; - else if (sYZID.Equals("JZ06")) - txtTJYZ6.Value = dYZZ; - else if (sYZID.Equals("JZ07")) - txtTJYZ7.Value = dYZZ; - else if (sYZID.Equals("JZ08")) - txtTJYZ8.Value = dYZZ; - else if (sYZID.Equals("JZ09")) - txtTJYZ9.Value = dYZZ; - else if (sYZID.Equals("JZ10")) - txtTJYZ10.Value = dYZZ; + + if (sYZID.StartsWith("JZ") && sYZID.Length == 4) // ȷ±£¸ñʽΪ "JZ01" ~ "JZ10" + { + string numStr = sYZID.Substring(2, 2); // Ìáȡ "01" ~ "10" + int index; + if (int.TryParse(numStr, out index) ) + { + // עÒâ¿ؼþID²»´øǰµ¼Á㣬Èç "txtTJYZ1" + gtNumTextBox txt = FindControl("txtTJYZ" + index) as gtNumTextBox; + if (txt != null) + { + txt.Value = dYZZ; + } + } + } } } #endregion @@ -306,65 +279,24 @@ namespace GThinking.N_XLXSBJ sql.ParamByName("pWHRID").Value = tSession.UserId; sql.ParamByName("pWHSJ").Value = tNow; - if (sTJYZList[i].StartsWith("JZ01|")) + string item = sTJYZList[i]; + + // ¼ì²éÊǷñÒÔ "JZ" + Á½λÊý×Ö + "|" ¿ªͷ + if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|') { - sql.ParamByName("pYZID").Value = "JZ01"; - sql.ParamByName("pYZZ").Value = txtTJYZ1.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ02|")) - { - sql.ParamByName("pYZID").Value = "JZ02"; - sql.ParamByName("pYZZ").Value = txtTJYZ2.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ03|")) - { - sql.ParamByName("pYZID").Value = "JZ03"; - sql.ParamByName("pYZZ").Value = txtTJYZ3.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ04|")) - { - sql.ParamByName("pYZID").Value = "JZ04"; - sql.ParamByName("pYZZ").Value = txtTJYZ4.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ05|")) - { - sql.ParamByName("pYZID").Value = "JZ05"; - sql.ParamByName("pYZZ").Value = txtTJYZ5.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ06|")) - { - sql.ParamByName("pYZID").Value = "JZ06"; - sql.ParamByName("pYZZ").Value = txtTJYZ6.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ07|")) - { - sql.ParamByName("pYZID").Value = "JZ07"; - sql.ParamByName("pYZZ").Value = txtTJYZ7.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ08|")) - { - sql.ParamByName("pYZID").Value = "JZ08"; - sql.ParamByName("pYZZ").Value = txtTJYZ8.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ09|")) - { - sql.ParamByName("pYZID").Value = "JZ09"; - sql.ParamByName("pYZZ").Value = txtTJYZ9.Value; - dberp.ExecSQL(sql); - } - else if (sTJYZList[i].StartsWith("JZ10|")) - { - sql.ParamByName("pYZID").Value = "JZ10"; - sql.ParamByName("pYZZ").Value = txtTJYZ10.Value; - dberp.ExecSQL(sql); + string numStr = item.Substring(2, 2); // Ìáȡ "01" ~ "10" + int index; + if (int.TryParse(numStr, out index) ) + { + // ¶¯̬¹¹Ôì¿ؼþID£¨²»´øǰµ¼Á㣩 + gtNumTextBox txt = FindControl("txtTJYZ" + index) as gtNumTextBox; + if (txt != null) + { + sql.ParamByName("pYZID").Value = "JZ" + numStr; // ±£³Ö "JZ01" ¸ñʽ + sql.ParamByName("pYZZ").Value = txt.Value; + dberp.ExecSQL(sql); + } + } } } #endregion @@ -404,45 +336,23 @@ namespace GThinking.N_XLXSBJ string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(','); for (int i = 0; i < sTJYZList.Length; i++) { - if (sTJYZList[i].StartsWith("JZ01|")) + string item = sTJYZList[i]; + + // ¼ì²é¸ñʽ£ºÒÔ "JZ" + Á½λÊý×Ö + "|" ¿ªͷ + if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|') { - lblTJYZ1.Text = sTJYZList[i].Replace("JZ01|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ02|")) - { - lblTJYZ2.Text = sTJYZList[i].Replace("JZ02|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ03|")) - { - lblTJYZ3.Text = sTJYZList[i].Replace("JZ03|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ04|")) - { - lblTJYZ4.Text = sTJYZList[i].Replace("JZ04|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ05|")) - { - lblTJYZ5.Text = sTJYZList[i].Replace("JZ05|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ06|")) - { - lblTJYZ6.Text = sTJYZList[i].Replace("JZ06|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ07|")) - { - lblTJYZ7.Text = sTJYZList[i].Replace("JZ07|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ08|")) - { - lblTJYZ8.Text = sTJYZList[i].Replace("JZ08|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ09|")) - { - lblTJYZ9.Text = sTJYZList[i].Replace("JZ09|", "") + "£º"; - } - else if (sTJYZList[i].StartsWith("JZ10|")) - { - lblTJYZ10.Text = sTJYZList[i].Replace("JZ10|", "") + "£º"; + string numStr = item.Substring(2, 2); // Ìáȡ "01" ~ "10" + int index; + if (int.TryParse(numStr, out index)) + { + // ¶¯̬¹¹Ôì¿ؼþID£¨²»´øǰµ¼Á㣩 + gtLabel lbl = FindControl("lblTJYZ" + index) as gtLabel; + if (lbl != null) + { + // ȥµô "JZxx|" ǰ׺£¬¼ÓÉÏ "£º" + lbl.Text = item.Substring(5) + "£º"; + } + } } } } diff --git a/TZYZJJ3Info.aspx.designer.cs b/TZYZJJ3Info.aspx.designer.cs index c11d5ba..78d9dd6 100644 --- a/TZYZJJ3Info.aspx.designer.cs +++ b/TZYZJJ3Info.aspx.designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // 此代码由工具生成。 -// 运行时版本:2.0.50727.9151 +// 运行时版本:2.0.50727.9179 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 @@ -271,6 +271,186 @@ namespace GThinking.N_XLXSBJ { /// protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ10; + /// + /// lblTJYZ11 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ11; + + /// + /// txtTJYZ11 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ11; + + /// + /// lblTJYZ12 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ12; + + /// + /// txtTJYZ12 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ12; + + /// + /// lblTJYZ13 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ13; + + /// + /// txtTJYZ13 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ13; + + /// + /// lblTJYZ14 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ14; + + /// + /// txtTJYZ14 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ14; + + /// + /// lblTJYZ15 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ15; + + /// + /// txtTJYZ15 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ15; + + /// + /// lblTJYZ16 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ16; + + /// + /// txtTJYZ16 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ16; + + /// + /// lblTJYZ17 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ17; + + /// + /// txtTJYZ17 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ17; + + /// + /// lblTJYZ18 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ18; + + /// + /// txtTJYZ18 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ18; + + /// + /// lblTJYZ19 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ19; + + /// + /// txtTJYZ19 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ19; + + /// + /// lblTJYZ20 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtLabel lblTJYZ20; + + /// + /// txtTJYZ20 控件。 + /// + /// + /// 自动生成的字段。 + /// 要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::GThinking.N_CONTROL.gtNumTextBox txtTJYZ20; + /// /// GtLabel5 控件。 /// diff --git a/XLBJDCalcUtils.cs b/XLBJDCalcUtils.cs index c312091..f3abff3 100644 --- a/XLBJDCalcUtils.cs +++ b/XLBJDCalcUtils.cs @@ -4643,8 +4643,18 @@ namespace GThinking.N_XLXSBJ dberp.ExecSQL(SQL); SQL.Clear(); - SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ) "); - SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH,isnull(XLXSJGBYZZ0_YZZ01,0),isnull(XLXSJGBYZZ0_YZZ02,0),isnull(XLXSJGBYZZ0_YZZ03,0),isnull(XLXSJGBYZZ0_YZZ04,0),isnull(XLXSJGBYZZ0_YZZ05,0),isnull(XLXSJGBYZZ0_YZZ06,0),isnull(XLXSJGBYZZ0_YZZ07,0),isnull(XLXSJGBYZZ0_YZZ08,0),isnull(XLXSJGBYZZ0_YZZ09,0),isnull(XLXSJGBYZZ0_YZZ10,0),V_XSBJJSJGB_JGBYSJDZ "); + string sYZZFields_1 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_1 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, " + sYZZFields_1 + ",XLXSBJDJJYZ_YSJDZ) "); + string sYZZFields_2 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_2 += "isnull(XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + ",0)" + (i < 20 ? "," : ""); + } + SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH," + sYZZFields_2 + ",V_XSBJJSJGB_JGBYSJDZ "); SQL.Add(" from V_XSBJJSJGB"); SQL.Add(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID=:pJGBID and XLXSJGBYZZ0_XH=V_XSBJJSJGB_SYJGBXH"); SQL.Add(" where V_XSBJJSJGB_ID=:pID and V_XSBJJSJGB_BJDID=:pBJDID "); @@ -4692,10 +4702,20 @@ namespace GThinking.N_XLXSBJ SQL.Clear(); SQL.Add(" merge into V_XSBJJSJGB tar "); SQL.Add(" using ( "); - SQL.Add("select BJDID,BJDXH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10 "); + string sYZZFields_3 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_3 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("select BJDID,BJDXH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ," + sYZZFields_3 + " "); SQL.Add(" from "); SQL.Add("("); - SQL.Add(" select XLXSBJDJJYZ_BJDID as BJDID,XLXSBJDJJYZ_XH as BJDXH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,"); + string sYZZFields_4 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_4 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" select XLXSBJDJJYZ_BJDID as BJDID,XLXSBJDJJYZ_XH as BJDXH," + sYZZFields_4 + ","); SQL.Add(" ("); SQL.Add(string.Format("XLXSBJDJJYZ_YZZ{0}", dsJGBYZ.Tables[0].Rows[0]["XLXSJGBYZ_YZID"].ToString().Trim().Replace("JZ", ""))); @@ -4925,10 +4945,20 @@ namespace GThinking.N_XLXSBJ //¼۸ñ±íµ÷¼ÛÒòËØ3£¬ֱ½ÓʹÓü۸ñ±íµ÷¼ÛÒò×Óֵ if (!sJGBIDS.Equals("")) { - + SQL.Clear(); - SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ) "); - SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH,isnull(XLXSJGBYZZ0_YZZ01,0),isnull(XLXSJGBYZZ0_YZZ02,0),isnull(XLXSJGBYZZ0_YZZ03,0),isnull(XLXSJGBYZZ0_YZZ04,0),isnull(XLXSJGBYZZ0_YZZ05,0),isnull(XLXSJGBYZZ0_YZZ06,0),isnull(XLXSJGBYZZ0_YZZ07,0),isnull(XLXSJGBYZZ0_YZZ08,0),isnull(XLXSJGBYZZ0_YZZ09,0),isnull(XLXSJGBYZZ0_YZZ10,0),V_XSBJJSJGB_JGBYSJDZ "); + string sYZZFields_5 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_5 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, " + sYZZFields_5 + ",XLXSBJDJJYZ_YSJDZ) "); + string sYZZFields_6 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_6 += "isnull(XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + ",0)" + (i < 20 ? "," : ""); + } + SQL.Add("select V_XSBJJSJGB_BJDID,V_XSBJJSJGB_BJDXH," + sYZZFields_6 + ",V_XSBJJSJGB_JGBYSJDZ "); SQL.Add(" from V_XSBJJSJGB"); SQL.Add(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID=:pJGBID3 and XLXSJGBYZZ0_XH=V_XSBJJSJGB_SYJGBXH"); SQL.Add(" where V_XSBJJSJGB_ID=:pID and V_XSBJJSJGB_BJDID=:pBJDID and V_XSBJJSJGB_SYJGBID=:pJGBID1"); @@ -5529,7 +5559,7 @@ namespace GThinking.N_XLXSBJ SQL.Add(" and V_XSBJJSJGB_WGCPBZ<>'Y' and V_XSBJJSJGB_JGFBZ<>'Y' "); SQL.Add(" and XLXSTZYZ_MXBH='JZJ' and XLXSTZYZ_YZID=:pYZID"); SQL.Add(" and XLXSTZYZ_TJYS='A' and XLXSJGBYZZA_JGBID=XLXSTZYZ_JGBID and XLXSJGBYZZA_YZID=XLXSTZYZ_YZID "); - SQL.Add(" and XLXSCPML_CPMLIDS like '%'||rtrim(case when A.XLXSBJTJXHML_CPMLID is null then B.XLXSBJTJXHML_CPMLID else A.XLXSBJTJXHML_CPMLID end)||'%' and XLXSJGBYZZA_XLGGID=convert(char,XLDTJMZHB_DTJM1) "); + SQL.Add(" and XLXSCPML_CPMLIDS like '%'||rtrim(case when A.XLXSBJTJXHML_CPMLID is null then B.XLXSBJTJXHML_CPMLID else A.XLXSBJTJXHML_CPMLID end)||'%' and CONVERT(float,XLXSJGBYZZA_XLGGID)=XLDTJMZHB_DTJM1 "); SQL.Add(" ) sor "); SQL.Add(" on( "); SQL.Add(" XLXSBJDJJYZ_BJDID=:pBJDID and XLXSBJDJJYZ_XH=BJDXH "); @@ -5604,7 +5634,10 @@ namespace GThinking.N_XLXSBJ SQL.Add(" select V_XSBJJSJGB_BJDID as BJDID,V_XSBJJSJGB_BJDXH as BJDXH"); SQL.Add(string.Format(",ISNULL(SUM(XLXSJGBYZZC_YZZ) ,0) as YZZ{0}", sTJYZ[i].Trim().Replace("JZ", ""))); SQL.Add(" from V_XSBJJSJGB "); - SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=V_XSBJJSJGB_XLXHID and XLXSBJCPYS_DYDJID=V_XSBJJSJGB_DYDJID "); + SQL.Add(" left join XLXHB on XLXHB_XLXHID=V_XSBJJSJGB_XLXHID "); + SQL.Add(" left join XLGGB on XLGGB_XLGGID = REPLACE(V_XSBJJSJGB_XLGGID , '*','¡Á') and XLGGB_XLGGJDGZ = isnull(XLXHB_XLGGJDGZ,'0') "); + SQL.Add(" left join XLDTJMZHB on XLDTJMZHB_DTJMZHID=XLGGB_DTJMZHID "); + SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=V_XSBJJSJGB_XLXHID and XLXSBJCPYS_DYDJID=V_XSBJJSJGB_DYDJID and XLDTJMZHB_DTJM1=CONVERT(float,XLXSBJCPYS_XLYSID) "); SQL.Add(" ,XLXSTZYZ,XLXSJGBYZZC "); SQL.Add(" where V_XSBJJSJGB_ID=:pID "); SQL.Add(" and V_XSBJJSJGB_BJDID=:pBJDID"); diff --git a/XLBJDInfo.aspx.cs b/XLBJDInfo.aspx.cs index 1a3ccbf..9ac248f 100644 --- a/XLBJDInfo.aspx.cs +++ b/XLBJDInfo.aspx.cs @@ -2203,11 +2203,19 @@ namespace GThinking.N_XLXSBJ #region 复制XLXSBJDJJYZ SQL.Clear(); SQL.Add(" insert into XLXSBJDJJYZ( "); - SQL.Add(" XLXSBJDJJYZ_BJDID,XLXSBJDJJYZ_XH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, "); - SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ"); + string sYZZFields_1 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_1 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" XLXSBJDJJYZ_BJDID,XLXSBJDJJYZ_XH," + sYZZFields_1 + ",XLXSBJDJJYZ_YSJDZ"); SQL.Add(" ) "); - SQL.Add(" select :pBJDID,XLXSBJDJJYZ_XH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, "); - SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ "); + string sYZZFields_2 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_2 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" select :pBJDID,XLXSBJDJJYZ_XH," + sYZZFields_2 + ",XLXSBJDJJYZ_YSJDZ "); SQL.Add(" from XLXSBJDJJYZ"); SQL.Add(" where XLXSBJDJJYZ_BJDID=:pOLDBJDID"); SQL.ParamByName("pBJDID").Value = txtBJDID.Text.Trim(); @@ -10606,7 +10614,7 @@ namespace GThinking.N_XLXSBJ case when isnull(XLXSJGB_MXBH,' ')='JGB' then ' ' else rtrim(convert(char,XLXSBJDJJYZ_YZZ01))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ02))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ03)) ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ04))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ05))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ06)) ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ07))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ08))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ09)) - ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ10))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YSJDZ)) end as UpdJJYZList,XLXSBJDMX_BJLY,XLXSBJDMX_BJTJCZ,case when isnull(XLXSBJDMXFD_BJDID,' ') = ' ' then 'N' else 'Y' end as HasFDJL + ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ10))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ11))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ12))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ13))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ14))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ15))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ16))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ17))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ18))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ19))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ20))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YSJDZ)) end as UpdJJYZList,XLXSBJDMX_BJLY,XLXSBJDMX_BJTJCZ,case when isnull(XLXSBJDMXFD_BJDID,' ') = ' ' then 'N' else 'Y' end as HasFDJL from XLXSBJDMX left join XLBZ on XLBZ_XLBZID = XLXSBJDMX_XLBZID left join XLYSB on XLYSB_XLYSID = XLXSBJDMX_XLYSID @@ -13060,7 +13068,7 @@ namespace GThinking.N_XLXSBJ grdXLBJDMX.EditNewRow(row.RowIndex, "UpdJJYZList", dicBaseJG["JZ01"].ToString().Trim() + "|" + dicBaseJG["JZ02"].ToString().Trim() + "|" + dicBaseJG["JZ03"].ToString().Trim() + "|" + dicBaseJG["JZ04"].ToString().Trim() + "|" + dicBaseJG["JZ05"].ToString().Trim() + "|" + dicBaseJG["JZ06"].ToString().Trim() + "|" + dicBaseJG["JZ07"].ToString().Trim() + "|" + dicBaseJG["JZ08"].ToString().Trim() + "|" + dicBaseJG["JZ09"].ToString().Trim() - + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|0"); + + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|" + dicBaseJG["JZ11"].ToString().Trim() + "|" + dicBaseJG["JZ12"].ToString().Trim() + "|" + dicBaseJG["JZ13"].ToString().Trim() + "|" + dicBaseJG["JZ14"].ToString().Trim() + "|" + dicBaseJG["JZ15"].ToString().Trim() + "|" + dicBaseJG["JZ16"].ToString().Trim() + "|" + dicBaseJG["JZ17"].ToString().Trim() + "|" + dicBaseJG["JZ18"].ToString().Trim() + "|" + dicBaseJG["JZ19"].ToString().Trim() + "|" + dicBaseJG["JZ20"].ToString().Trim() + "|0"); } else { @@ -13285,7 +13293,7 @@ namespace GThinking.N_XLXSBJ row["UpdJJYZList"] = dicBaseJG["JZ01"].ToString().Trim() + "|" + dicBaseJG["JZ02"].ToString().Trim() + "|" + dicBaseJG["JZ03"].ToString().Trim() + "|" + dicBaseJG["JZ04"].ToString().Trim() + "|" + dicBaseJG["JZ05"].ToString().Trim() + "|" + dicBaseJG["JZ06"].ToString().Trim() + "|" + dicBaseJG["JZ07"].ToString().Trim() + "|" + dicBaseJG["JZ08"].ToString().Trim() + "|" + dicBaseJG["JZ09"].ToString().Trim() - + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|0"; + + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|" + dicBaseJG["JZ11"].ToString().Trim() + "|" + dicBaseJG["JZ12"].ToString().Trim() + "|" + dicBaseJG["JZ13"].ToString().Trim() + "|" + dicBaseJG["JZ14"].ToString().Trim() + "|" + dicBaseJG["JZ15"].ToString().Trim() + "|" + dicBaseJG["JZ16"].ToString().Trim() + "|" + dicBaseJG["JZ17"].ToString().Trim() + "|" + dicBaseJG["JZ18"].ToString().Trim() + "|" + dicBaseJG["JZ19"].ToString().Trim() + "|" + dicBaseJG["JZ20"].ToString().Trim() + "|0"; } else { @@ -13466,7 +13474,7 @@ namespace GThinking.N_XLXSBJ row["UpdJJYZList"] = dicBaseJG["JZ01"].ToString().Trim() + "|" + dicBaseJG["JZ02"].ToString().Trim() + "|" + dicBaseJG["JZ03"].ToString().Trim() + "|" + dicBaseJG["JZ04"].ToString().Trim() + "|" + dicBaseJG["JZ05"].ToString().Trim() + "|" + dicBaseJG["JZ06"].ToString().Trim() + "|" + dicBaseJG["JZ07"].ToString().Trim() + "|" + dicBaseJG["JZ08"].ToString().Trim() + "|" + dicBaseJG["JZ09"].ToString().Trim() - + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|0"; + + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|" + dicBaseJG["JZ11"].ToString().Trim() + "|" + dicBaseJG["JZ12"].ToString().Trim() + "|" + dicBaseJG["JZ13"].ToString().Trim() + "|" + dicBaseJG["JZ14"].ToString().Trim() + "|" + dicBaseJG["JZ15"].ToString().Trim() + "|" + dicBaseJG["JZ16"].ToString().Trim() + "|" + dicBaseJG["JZ17"].ToString().Trim() + "|" + dicBaseJG["JZ18"].ToString().Trim() + "|" + dicBaseJG["JZ19"].ToString().Trim() + "|" + dicBaseJG["JZ20"].ToString().Trim() + "|0"; } else { @@ -13648,7 +13656,7 @@ namespace GThinking.N_XLXSBJ row["UpdJJYZList"] = dicBaseJG["JZ01"].ToString().Trim() + "|" + dicBaseJG["JZ02"].ToString().Trim() + "|" + dicBaseJG["JZ03"].ToString().Trim() + "|" + dicBaseJG["JZ04"].ToString().Trim() + "|" + dicBaseJG["JZ05"].ToString().Trim() + "|" + dicBaseJG["JZ06"].ToString().Trim() + "|" + dicBaseJG["JZ07"].ToString().Trim() + "|" + dicBaseJG["JZ08"].ToString().Trim() + "|" + dicBaseJG["JZ09"].ToString().Trim() - + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|0"; + + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|" + dicBaseJG["JZ11"].ToString().Trim() + "|" + dicBaseJG["JZ12"].ToString().Trim() + "|" + dicBaseJG["JZ13"].ToString().Trim() + "|" + dicBaseJG["JZ14"].ToString().Trim() + "|" + dicBaseJG["JZ15"].ToString().Trim() + "|" + dicBaseJG["JZ16"].ToString().Trim() + "|" + dicBaseJG["JZ17"].ToString().Trim() + "|" + dicBaseJG["JZ18"].ToString().Trim() + "|" + dicBaseJG["JZ19"].ToString().Trim() + "|" + dicBaseJG["JZ20"].ToString().Trim() + "|0"; } else { @@ -13913,7 +13921,7 @@ namespace GThinking.N_XLXSBJ grdXLBJDMX.EditNewRow(row.RowIndex, "UpdJJYZList", dicBaseJG["JZ01"].ToString().Trim() + "|" + dicBaseJG["JZ02"].ToString().Trim() + "|" + dicBaseJG["JZ03"].ToString().Trim() + "|" + dicBaseJG["JZ04"].ToString().Trim() + "|" + dicBaseJG["JZ05"].ToString().Trim() + "|" + dicBaseJG["JZ06"].ToString().Trim() + "|" + dicBaseJG["JZ07"].ToString().Trim() + "|" + dicBaseJG["JZ08"].ToString().Trim() + "|" + dicBaseJG["JZ09"].ToString().Trim() - + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|0"); + + "|" + dicBaseJG["JZ10"].ToString().Trim() + "|" + dicBaseJG["JZ11"].ToString().Trim() + "|" + dicBaseJG["JZ12"].ToString().Trim() + "|" + dicBaseJG["JZ13"].ToString().Trim() + "|" + dicBaseJG["JZ14"].ToString().Trim() + "|" + dicBaseJG["JZ15"].ToString().Trim() + "|" + dicBaseJG["JZ16"].ToString().Trim() + "|" + dicBaseJG["JZ17"].ToString().Trim() + "|" + dicBaseJG["JZ18"].ToString().Trim() + "|" + dicBaseJG["JZ19"].ToString().Trim() + "|" + dicBaseJG["JZ20"].ToString().Trim() + "|0"); } else { @@ -15785,7 +15793,7 @@ namespace GThinking.N_XLXSBJ { string sUpdJJYZList = e.RowData["UpdJJYZList"].ToString().Trim(); if (sUpdJJYZList.Equals("")) - sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0"; + sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"; string sTZQZDXJ = e.RowData["XLXSBJDMX_TZQZDXJ"].ToString().Trim(); double dTZQZDXJ = CMISproConvert.StrToFloat(stZDXJ); sTZQZDXJ = XLBJDUtils.GetZDXJ(stCLCB, stBJDHQCLCB, stJGBJJ, stJGBBJ, stCPBJ, stYZZ01, stYZZ02, stYZZ03, stYZZ04, stYZZ05, stYZZ06, stYZZ07, stYZZ08, stYZZ09, stYZZ10, stYZZ11, stYZZ12, stYZZ13, stYZZ14, stYZZ15, stYZZ16, stYZZ17, stYZZ18, stYZZ19, stYZZ20, dicChangedField, sTZQZDXJ, e.MasterDataSet["cbxBJFLID"].Trim(), 8, e.RowData["XLXSBJDMX_ZDXJBJDID"].ToString().Trim(), sUpdJJYZList); @@ -16673,8 +16681,8 @@ namespace GThinking.N_XLXSBJ sJJ = dJGFJJ.ToString().Trim(); sCLCB = dJGFJJ.ToString().Trim(); sBJDHQCLCB = dJGFJJ.ToString().Trim(); - e.ResultPairs.Add("UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); - AddChangedField(dicChangedField, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); + e.ResultPairs.Add("UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); + AddChangedField(dicChangedField, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); } else if (sWGCPBZ.Equals("Y")) { @@ -16683,8 +16691,8 @@ namespace GThinking.N_XLXSBJ sJJ = "0"; sCLCB = "0"; sBJDHQCLCB = "0"; - e.ResultPairs.Add("UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); - AddChangedField(dicChangedField, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); + e.ResultPairs.Add("UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); + AddChangedField(dicChangedField, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); } else { @@ -16730,7 +16738,7 @@ namespace GThinking.N_XLXSBJ e.ResultPairs.Add("UpdJJYZList", dicJJYZList["JZ01"].ToString().Trim() + "|" + dicJJYZList["JZ02"].ToString().Trim() + "|" + dicJJYZList["JZ03"].ToString().Trim() + "|" + dicJJYZList["JZ04"].ToString().Trim() + "|" + dicJJYZList["JZ05"].ToString().Trim() + "|" + dicJJYZList["JZ06"].ToString().Trim() + "|" + dicJJYZList["JZ07"].ToString().Trim() - + "|" + dicJJYZList["JZ08"].ToString().Trim() + "|" + dicJJYZList["JZ09"].ToString().Trim() + "|" + dicJJYZList["JZ10"].ToString().Trim() + "|" + dicJJYZList["YSJDZ"].ToString().Trim()); + + "|" + dicJJYZList["JZ08"].ToString().Trim() + "|" + dicJJYZList["JZ09"].ToString().Trim() + "|" + dicJJYZList["JZ10"].ToString().Trim() + "|" + dicJJYZList["JZ11"].ToString().Trim() + "|" + dicJJYZList["JZ12"].ToString().Trim() + "|" + dicJJYZList["JZ13"].ToString().Trim() + "|" + dicJJYZList["JZ14"].ToString().Trim() + "|" + dicJJYZList["JZ15"].ToString().Trim() + "|" + dicJJYZList["JZ16"].ToString().Trim() + "|" + dicJJYZList["JZ17"].ToString().Trim() + "|" + dicJJYZList["JZ18"].ToString().Trim() + "|" + dicJJYZList["JZ19"].ToString().Trim() + "|" + dicJJYZList["JZ20"].ToString().Trim() + "|" + dicJJYZList["YSJDZ"].ToString().Trim()); //这里根据换算比例将GetFromJGB_BJDHQ_JGBTJYS3已经换算的数据再换算回来,交由下方统一换算 double dBJD_JGB_JLDWHSBL = XLBJDUtils.GetJLDWHSBL_JG(sJLDW, sJGBJLDW); @@ -17099,16 +17107,16 @@ namespace GThinking.N_XLXSBJ } e.ResultPairs.Add("UpdJJYZList", dicJGBTZYZGS_JGE["JZ01"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ02"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ03"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ04"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ05"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ06"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ07"].Trim() - + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|0"); + + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ11"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ12"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ13"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ14"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ15"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ16"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ17"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ18"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ19"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ20"].ToString().Trim() + "|0"); AddChangedField(dicChangedField, "UpdJJYZList", dicJGBTZYZGS_JGE["JZ01"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ02"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ03"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ04"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ05"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ06"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ07"].Trim() - + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|0"); + + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ11"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ12"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ13"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ14"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ15"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ16"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ17"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ18"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ19"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ20"].ToString().Trim() + "|0"); } else { - e.ResultPairs.Add("UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); - AddChangedField(dicChangedField, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); + e.ResultPairs.Add("UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); + AddChangedField(dicChangedField, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); } if (JgIsZero)//若存在有材料用量、无材料价格的情况,则算出的表价、报价单行情料价改为负数显示 @@ -21749,7 +21757,7 @@ namespace GThinking.N_XLXSBJ if (isChanged) { if (sUpdJJYZList.Equals("")) - sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0"; + sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"; if (!e.EventFieldName.Equals("XLXSBJDMX_ZDXJ")) { double dTZQZDXJ = CMISproConvert.StrToFloat(stZDXJ); @@ -26870,7 +26878,7 @@ namespace GThinking.N_XLXSBJ { SQL.Clear(); SQL.Add("update XLXSBJDJJYZ set XLXSBJDJJYZ_YZZ01=:pYZZ01,XLXSBJDJJYZ_YZZ02=:pYZZ02,XLXSBJDJJYZ_YZZ03=:pYZZ03,XLXSBJDJJYZ_YZZ04=:pYZZ04,XLXSBJDJJYZ_YZZ05=:pYZZ05,"); - SQL.Add(" XLXSBJDJJYZ_YZZ06=:pYZZ06,XLXSBJDJJYZ_YZZ07=:pYZZ07,XLXSBJDJJYZ_YZZ08=:pYZZ08,XLXSBJDJJYZ_YZZ09=:pYZZ09,XLXSBJDJJYZ_YZZ10=:pYZZ10 "); + SQL.Add(" XLXSBJDJJYZ_YZZ06=:pYZZ06,XLXSBJDJJYZ_YZZ07=:pYZZ07,XLXSBJDJJYZ_YZZ08=:pYZZ08,XLXSBJDJJYZ_YZZ09=:pYZZ09,XLXSBJDJJYZ_YZZ10=:pYZZ10,XLXSBJDJJYZ_YZZ11=:pYZZ11,XLXSBJDJJYZ_YZZ12=:pYZZ12,XLXSBJDJJYZ_YZZ13=:pYZZ13,XLXSBJDJJYZ_YZZ14=:pYZZ14,XLXSBJDJJYZ_YZZ15=:pYZZ15,XLXSBJDJJYZ_YZZ16=:pYZZ16,XLXSBJDJJYZ_YZZ17=:pYZZ17,XLXSBJDJJYZ_YZZ18=:pYZZ18,XLXSBJDJJYZ_YZZ19=:pYZZ19,XLXSBJDJJYZ_YZZ20=:pYZZ20 "); SQL.Add(" where XLXSBJDJJYZ_BJDID=:pBJDID and XLXSBJDJJYZ_XH=:pBJDXH"); SQL.ParamByName("pBJDID").Value = sBJDID; SQL.ParamByName("pBJDXH").Value = sXH; @@ -26884,6 +26892,16 @@ namespace GThinking.N_XLXSBJ SQL.ParamByName("pYZZ08").Value = dicJJYZList_JGE["JZ08"]; SQL.ParamByName("pYZZ09").Value = dicJJYZList_JGE["JZ09"]; SQL.ParamByName("pYZZ10").Value = dicJJYZList_JGE["JZ10"]; + SQL.ParamByName("pYZZ11").Value = dicJJYZList_JGE["JZ11"]; + SQL.ParamByName("pYZZ12").Value = dicJJYZList_JGE["JZ12"]; + SQL.ParamByName("pYZZ13").Value = dicJJYZList_JGE["JZ13"]; + SQL.ParamByName("pYZZ14").Value = dicJJYZList_JGE["JZ14"]; + SQL.ParamByName("pYZZ15").Value = dicJJYZList_JGE["JZ15"]; + SQL.ParamByName("pYZZ16").Value = dicJJYZList_JGE["JZ16"]; + SQL.ParamByName("pYZZ17").Value = dicJJYZList_JGE["JZ17"]; + SQL.ParamByName("pYZZ18").Value = dicJJYZList_JGE["JZ18"]; + SQL.ParamByName("pYZZ19").Value = dicJJYZList_JGE["JZ19"]; + SQL.ParamByName("pYZZ20").Value = dicJJYZList_JGE["JZ20"]; dberp.ExecSQL(SQL); } @@ -27142,7 +27160,7 @@ namespace GThinking.N_XLXSBJ { SQL.Clear(); SQL.Add("update XLXSBJDJJYZ set XLXSBJDJJYZ_YZZ01=:pYZZ01,XLXSBJDJJYZ_YZZ02=:pYZZ02,XLXSBJDJJYZ_YZZ03=:pYZZ03,XLXSBJDJJYZ_YZZ04=:pYZZ04,XLXSBJDJJYZ_YZZ05=:pYZZ05,"); - SQL.Add(" XLXSBJDJJYZ_YZZ06=:pYZZ06,XLXSBJDJJYZ_YZZ07=:pYZZ07,XLXSBJDJJYZ_YZZ08=:pYZZ08,XLXSBJDJJYZ_YZZ09=:pYZZ09,XLXSBJDJJYZ_YZZ10=:pYZZ10 "); + SQL.Add(" XLXSBJDJJYZ_YZZ06=:pYZZ06,XLXSBJDJJYZ_YZZ07=:pYZZ07,XLXSBJDJJYZ_YZZ08=:pYZZ08,XLXSBJDJJYZ_YZZ09=:pYZZ09,XLXSBJDJJYZ_YZZ10=:pYZZ10,XLXSBJDJJYZ_YZZ11=:pYZZ11,XLXSBJDJJYZ_YZZ12=:pYZZ12,XLXSBJDJJYZ_YZZ13=:pYZZ13,XLXSBJDJJYZ_YZZ14=:pYZZ14,XLXSBJDJJYZ_YZZ15=:pYZZ15,XLXSBJDJJYZ_YZZ16=:pYZZ16,XLXSBJDJJYZ_YZZ17=:pYZZ17,XLXSBJDJJYZ_YZZ18=:pYZZ18,XLXSBJDJJYZ_YZZ19=:pYZZ19,XLXSBJDJJYZ_YZZ20=:pYZZ20 "); SQL.Add(" where XLXSBJDJJYZ_BJDID=:pBJDID and XLXSBJDJJYZ_XH=:pBJDXH"); SQL.ParamByName("pBJDID").Value = sBJDID; SQL.ParamByName("pBJDXH").Value = sXH; @@ -27156,6 +27174,16 @@ namespace GThinking.N_XLXSBJ SQL.ParamByName("pYZZ08").Value = dicJJYZList_JGE["JZ08"]; SQL.ParamByName("pYZZ09").Value = dicJJYZList_JGE["JZ09"]; SQL.ParamByName("pYZZ10").Value = dicJJYZList_JGE["JZ10"]; + SQL.ParamByName("pYZZ11").Value = dicJJYZList_JGE["JZ11"]; + SQL.ParamByName("pYZZ12").Value = dicJJYZList_JGE["JZ12"]; + SQL.ParamByName("pYZZ13").Value = dicJJYZList_JGE["JZ13"]; + SQL.ParamByName("pYZZ14").Value = dicJJYZList_JGE["JZ14"]; + SQL.ParamByName("pYZZ15").Value = dicJJYZList_JGE["JZ15"]; + SQL.ParamByName("pYZZ16").Value = dicJJYZList_JGE["JZ16"]; + SQL.ParamByName("pYZZ17").Value = dicJJYZList_JGE["JZ17"]; + SQL.ParamByName("pYZZ18").Value = dicJJYZList_JGE["JZ18"]; + SQL.ParamByName("pYZZ19").Value = dicJJYZList_JGE["JZ19"]; + SQL.ParamByName("pYZZ20").Value = dicJJYZList_JGE["JZ20"]; dberp.ExecSQL(SQL); } @@ -28157,8 +28185,18 @@ namespace GThinking.N_XLXSBJ if (!IsJGEJGB)//是否需要按价格表报价 { SQL.Clear(); - SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ) "); - SQL.Add("select XLXSBJDMX_BJDID,XLXSBJDMX_XH,isnull(XLXSJGBYZZ0_YZZ01,0),isnull(XLXSJGBYZZ0_YZZ02,0),isnull(XLXSJGBYZZ0_YZZ03,0),isnull(XLXSJGBYZZ0_YZZ04,0),isnull(XLXSJGBYZZ0_YZZ05,0),isnull(XLXSJGBYZZ0_YZZ06,0),isnull(XLXSJGBYZZ0_YZZ07,0),isnull(XLXSJGBYZZ0_YZZ08,0),isnull(XLXSJGBYZZ0_YZZ09,0),isnull(XLXSJGBYZZ0_YZZ10,0),isnull(XLXSJGBMX_YSJDZ,0) "); + string sYZZFields_3 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_3 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID, XLXSBJDJJYZ_XH, " + sYZZFields_3 + ",XLXSBJDJJYZ_YSJDZ) "); + string sYZZFields_4 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_4 += "isnull(XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + ",0)" + (i < 20 ? "," : ""); + } + SQL.Add("select XLXSBJDMX_BJDID,XLXSBJDMX_XH," + sYZZFields_4 + ",isnull(XLXSJGBMX_YSJDZ,0) "); SQL.Add(" from XLXSBJDMX "); SQL.Add(" left join XLXSJGBMX on XLXSJGBMX_JGBID=:pJGBID and XLXSJGBMX_XLXHID=XLXSBJDMX_XLXHID and XLXSJGBMX_XLGGID=XLXSBJDMX_XLGGID and XLXSJGBMX_XLBZID=XLXSBJDMX_XLBZID and XLXSJGBMX_DYDJID=XLXSBJDMX_DYDJID"); SQL.Add(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID=:pJGBID and XLXSJGBYZZ0_XH=XLXSJGBMX_XH"); @@ -28750,7 +28788,7 @@ namespace GThinking.N_XLXSBJ double dQZDXJ = CMISproConvert.StrToFloat(grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_ZDXJ", row)); string sUpdJJYZList = grdXLBJDMX.GetValueByFieldName("UpdJJYZList", row); if (sUpdJJYZList.Equals("")) - sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0"; + sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"; //计算最低限价、最低限价价差率 dicChangedField.Add("XLXSBJDMX_CLCB", grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_CLCB", row));//此处简单处理,只为能够触发计算 @@ -29131,7 +29169,7 @@ namespace GThinking.N_XLXSBJ dCPBJ = XLBJDUtils.RoundSZ(dCPBJ, CMISproConvert.StrToInt(sCPBJMRXSWS)); string sUpdJJYZList = row["UpdJJYZList"].ToString().Trim(); if (sUpdJJYZList.Equals("")) - sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0"; + sUpdJJYZList = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"; double dQZDXJ = CMISproConvert.StrToFloat(row["XLXSBJDMX_ZDXJ"].ToString().Trim()); //计算最低限价、最低限价价差率 dicChangedField.Add("XLXSBJDMX_CLCB", row["XLXSBJDMX_CLCB"].ToString().Trim());//此处简单处理,只为能够触发计算 @@ -31911,10 +31949,10 @@ namespace GThinking.N_XLXSBJ grdXLBJDMX.EditNewRow(row.RowIndex, "UpdJJYZList", dicJGBTZYZGS_JGE["JZ01"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ02"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ03"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ04"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ05"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ06"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ07"].Trim() - + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|0"); + + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ11"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ12"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ13"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ14"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ15"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ16"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ17"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ18"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ19"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ20"].ToString().Trim() + "|0"); } else - grdXLBJDMX.EditNewRow(row.RowIndex, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0"); + grdXLBJDMX.EditNewRow(row.RowIndex, "UpdJJYZList", "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"); if (JgIsZero)//若存在有材料用量、无材料价格的情况,则算出的表价、报价单行情料价改为负数显示 { @@ -32149,10 +32187,10 @@ namespace GThinking.N_XLXSBJ row["UpdJJYZList"] = dicJGBTZYZGS_JGE["JZ01"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ02"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ03"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ04"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ05"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ06"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ07"].Trim() - + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|0"; + + "|" + dicJGBTZYZGS_JGE["JZ08"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ09"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ10"].Trim() + "|" + dicJGBTZYZGS_JGE["JZ11"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ12"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ13"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ14"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ15"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ16"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ17"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ18"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ19"].ToString().Trim() + "|" + dicJGBTZYZGS_JGE["JZ20"].ToString().Trim() + "|0"; } else - row["UpdJJYZList"] = "0|0|0|0|0|0|0|0|0|0|0"; + row["UpdJJYZList"] = "0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0"; if (JgIsZero)//若存在有材料用量、无材料价格的情况,则算出的表价、报价单行情料价改为负数显示 { diff --git a/XLBJDUtils.cs b/XLBJDUtils.cs index 26a925f..5462c2d 100644 --- a/XLBJDUtils.cs +++ b/XLBJDUtils.cs @@ -2976,7 +2976,7 @@ namespace GThinking.N_XLXSBJ return dicYZZB; } - public static Dictionary GetJGBYZZC(string sJGEJGBID, string sXLXHID, string sDYDJID) + public static Dictionary GetJGBYZZC(string sJGEJGBID, string sXLXHID, string sDYDJID,string sZXJM) { Dictionary dicYZZC = new Dictionary(); dicYZZC.Clear(); @@ -2986,10 +2986,11 @@ namespace GThinking.N_XLXSBJ sql.Add(" from XLXSJGBYZZC,XLXSTZYZ "); sql.Add(" where XLXSTZYZ_JGBID=XLXSJGBYZZC_JGBID and XLXSTZYZ_YZID=XLXSJGBYZZC_YZID and XLXSTZYZ_MXBH='JZJ'"); sql.Add(" and exists(select 1 from XLXSJGBYZ where XLXSJGBYZ_JGBID =:pJGEJGBID and XLXSJGBYZ_YZID = XLXSTZYZ_YZID)"); - sql.Add(" and exists(select 1 from XLXSBJCPYS where XLXSBJCPYS_XLJBXHID=:pXLXHID and XLXSBJCPYS_DYDJID=:pDYDJID and XLXSBJCPYS_XXJGID =XLXSJGBYZZC_CPTX )"); + sql.Add(" and exists(select 1 from XLXSBJCPYS where XLXSBJCPYS_XLJBXHID=:pXLXHID and XLXSBJCPYS_DYDJID=:pDYDJID and XLXSBJCPYS_XLYSID=:pZXJM and XLXSBJCPYS_XXJGID =XLXSJGBYZZC_CPTX )"); sql.ParamByName("pJGEJGBID").Value = sJGEJGBID; sql.ParamByName("pXLXHID").Value = sXLXHID; sql.ParamByName("pDYDJID").Value = sDYDJID; + sql.ParamByName("pZXJM").Value = sZXJM; DataSet ds = dberp.OpenDataSet(sql); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) @@ -7955,8 +7956,12 @@ namespace GThinking.N_XLXSBJ SQL.Add(" XLXSBJDYZZ0_YZZ16,XLXSBJDYZZ0_YZZ17,XLXSBJDYZZ0_YZZ18,XLXSBJDYZZ0_YZZ19,XLXSBJDYZZ0_YZZ20 "); if (sMXBH.Equals("JGE")) { - SQL.Add(" ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, "); - SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10"); + string sYZZFields_1 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_1 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" ," + sYZZFields_1); } SQL.Add(" from XLXSBJDMX "); @@ -8176,8 +8181,12 @@ namespace GThinking.N_XLXSBJ SQL.Add(" XLXSBJDYZZ0_YZZ16,XLXSBJDYZZ0_YZZ17,XLXSBJDYZZ0_YZZ18,XLXSBJDYZZ0_YZZ19,XLXSBJDYZZ0_YZZ20 "); if (sMXBH.Equals("JGE")) { - SQL.Add(" ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, "); - SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10"); + string sYZZFields_2 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_2 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" ," + sYZZFields_2); } SQL.Add(" from XLXSBJDMX "); @@ -8505,8 +8514,12 @@ namespace GThinking.N_XLXSBJ SQL.Add(" XLXSBJDYZZ0_YZZ16,XLXSBJDYZZ0_YZZ17,XLXSBJDYZZ0_YZZ18,XLXSBJDYZZ0_YZZ19,XLXSBJDYZZ0_YZZ20 "); if (sMXBH.Equals("JGE")) { - SQL.Add(" ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, "); - SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10"); + string sYZZFields_3 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_3 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" ," + sYZZFields_3); } SQL.Add(" from XLXSBJDMX "); @@ -8716,7 +8729,7 @@ namespace GThinking.N_XLXSBJ { string[] strJJYZZ = sUpdJJYZList.ToString().Trim().Split('|'); sJSJGS = sJSJGS.Replace("JZ01", strJJYZZ[0]).Replace("JZ02", strJJYZZ[1]).Replace("JZ03", strJJYZZ[2]).Replace("JZ04", strJJYZZ[3]).Replace("JZ05", strJJYZZ[4]); - sJSJGS = sJSJGS.Replace("JZ06", strJJYZZ[5]).Replace("JZ07", strJJYZZ[6]).Replace("JZ08", strJJYZZ[7]).Replace("JZ09", strJJYZZ[8]).Replace("JZ10", strJJYZZ[9]); + sJSJGS = sJSJGS.Replace("JZ06", strJJYZZ[5]).Replace("JZ07", strJJYZZ[6]).Replace("JZ08", strJJYZZ[7]).Replace("JZ09", strJJYZZ[8]).Replace("JZ10", strJJYZZ[9]).Replace("JZ11", strJJYZZ[10]).Replace("JZ12", strJJYZZ[11]).Replace("JZ13", strJJYZZ[12]).Replace("JZ14", strJJYZZ[13]).Replace("JZ15", strJJYZZ[14]).Replace("JZ16", strJJYZZ[15]).Replace("JZ17", strJJYZZ[16]).Replace("JZ18", strJJYZZ[17]).Replace("JZ19", strJJYZZ[18]).Replace("JZ20", strJJYZZ[19]); } double dJSJ = 0; gtExpression exp = new gtExpression(); @@ -9665,8 +9678,12 @@ namespace GThinking.N_XLXSBJ SQL.Add(" XLXSBJDYZZ0_YZZ16,XLXSBJDYZZ0_YZZ17,XLXSBJDYZZ0_YZZ18,XLXSBJDYZZ0_YZZ19,XLXSBJDYZZ0_YZZ20 "); if (sMXBH.Equals("JGE")) { - SQL.Add(" ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05, "); - SQL.Add(" XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10"); + string sYZZFields_4 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_4 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" ," + sYZZFields_4); } SQL.Add(" from XLXSBJDMX "); @@ -10630,7 +10647,7 @@ namespace GThinking.N_XLXSBJ Dictionary dicYZZC = new Dictionary(); if (!sTJYSListC.Equals("")) { - dicYZZC = XLBJDUtils.GetJGBYZZC(sJGEJGBID, dicXLJBXX["XLXHID"], dicXLJBXX["DYDJID"]); + dicYZZC = XLBJDUtils.GetJGBYZZC(sJGEJGBID, dicXLJBXX["XLXHID"], dicXLJBXX["DYDJID"], fZXJM); } foreach (string sYZID in dicYZZ0.Keys) @@ -10944,7 +10961,12 @@ namespace GThinking.N_XLXSBJ SQL.Clear(); SQL.Add(" merge into XLXSBJDMX tar "); SQL.Add(" using ( "); - SQL.Add("select XLXSBJDJJYZ_BJDID AS BJDID,XLXSBJDJJYZ_XH AS XH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10 "); + string sYZZFields_5 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_5 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("select XLXSBJDJJYZ_BJDID AS BJDID,XLXSBJDJJYZ_XH AS XH," + sYZZFields_5 + " "); SQL.Add(" from XLXSBJDJJYZ"); SQL.Add(" where 1 = 1 and XLXSBJDJJYZ_BJDID = :pBJDID "); if (!dicXLJBXX["XH"].Trim().Equals("")) @@ -11915,7 +11937,12 @@ namespace GThinking.N_XLXSBJ //ȡ¼۸ñ±íÒò×Óֵ£¬ºóÐøÓÃÓڸüб¨¼۵¥Ã÷ϸUpdJJYZListÀ¸Ŀ SQL.Clear(); - SQL.Add("select XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10"); + string sYZZFields_6 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_6 += "XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("select " + sYZZFields_6); SQL.Add(" from XLXSJGBYZZ0"); SQL.Add(" where XLXSJGBYZZ0_JGBID=:pJGBID3 and XLXSJGBYZZ0_XH=:pJGBXH1"); SQL.ParamByName("pJGBID3").Value = sJGBID; @@ -11932,7 +11959,7 @@ namespace GThinking.N_XLXSBJ dicJJYZList.Add("JZ07", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ07"].ToString(), 0)); dicJJYZList.Add("JZ08", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ08"].ToString(), 0)); dicJJYZList.Add("JZ09", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ09"].ToString(), 0)); - dicJJYZList.Add("JZ10", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ10"].ToString(), 0)); + dicJJYZList.Add("JZ10", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ10"].ToString(), 0)); dicJJYZList.Add("JZ11", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ11"].ToString(), 0)); dicJJYZList.Add("JZ12", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ12"].ToString(), 0)); dicJJYZList.Add("JZ13", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ13"].ToString(), 0)); dicJJYZList.Add("JZ14", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ14"].ToString(), 0)); dicJJYZList.Add("JZ15", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ15"].ToString(), 0)); dicJJYZList.Add("JZ16", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ16"].ToString(), 0)); dicJJYZList.Add("JZ17", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ17"].ToString(), 0)); dicJJYZList.Add("JZ18", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ18"].ToString(), 0)); dicJJYZList.Add("JZ19", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ19"].ToString(), 0)); dicJJYZList.Add("JZ20", CMISproConvert.StrToFloat(dsJJYZ.Tables[0].Rows[0]["XLXSJGBYZZ0_YZZ20"].ToString(), 0)); dicJJYZList.Add("YSJDZ", CMISproConvert.StrToFloat(sYSJDZ, 0)); } else @@ -11946,7 +11973,7 @@ namespace GThinking.N_XLXSBJ dicJJYZList.Add("JZ07", 0); dicJJYZList.Add("JZ08", 0); dicJJYZList.Add("JZ09", 0); - dicJJYZList.Add("JZ10", 0); + dicJJYZList.Add("JZ10", 0); dicJJYZList.Add("JZ11", 0); dicJJYZList.Add("JZ12", 0); dicJJYZList.Add("JZ13", 0); dicJJYZList.Add("JZ14", 0); dicJJYZList.Add("JZ15", 0); dicJJYZList.Add("JZ16", 0); dicJJYZList.Add("JZ17", 0); dicJJYZList.Add("JZ18", 0); dicJJYZList.Add("JZ19", 0); dicJJYZList.Add("JZ20", 0); dicJJYZList.Add("YSJDZ", CMISproConvert.StrToFloat(sYSJDZ, 0)); } } @@ -12068,7 +12095,7 @@ namespace GThinking.N_XLXSBJ dicJJYZList_JGE.Add("JZ07", 0); dicJJYZList_JGE.Add("JZ08", 0); dicJJYZList_JGE.Add("JZ09", 0); - dicJJYZList_JGE.Add("JZ10", 0); + dicJJYZList_JGE.Add("JZ10", 0); dicJJYZList_JGE.Add("JZ11", 0); dicJJYZList_JGE.Add("JZ12", 0); dicJJYZList_JGE.Add("JZ13", 0); dicJJYZList_JGE.Add("JZ14", 0); dicJJYZList_JGE.Add("JZ15", 0); dicJJYZList_JGE.Add("JZ16", 0); dicJJYZList_JGE.Add("JZ17", 0); dicJJYZList_JGE.Add("JZ18", 0); dicJJYZList_JGE.Add("JZ19", 0); dicJJYZList_JGE.Add("JZ20", 0); } string sCPJJ = ""; @@ -12470,7 +12497,7 @@ namespace GThinking.N_XLXSBJ dicJJYZList_JGE["JZ07"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ07"], 0); dicJJYZList_JGE["JZ08"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ08"], 0); dicJJYZList_JGE["JZ09"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ09"], 0); - dicJJYZList_JGE["JZ10"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ10"], 0); + dicJJYZList_JGE["JZ10"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ10"], 0); dicJJYZList_JGE["JZ11"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ11"], 0); dicJJYZList_JGE["JZ12"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ12"], 0); dicJJYZList_JGE["JZ13"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ13"], 0); dicJJYZList_JGE["JZ14"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ14"], 0); dicJJYZList_JGE["JZ15"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ15"], 0); dicJJYZList_JGE["JZ16"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ16"], 0); dicJJYZList_JGE["JZ17"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ17"], 0); dicJJYZList_JGE["JZ18"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ18"], 0); dicJJYZList_JGE["JZ19"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ19"], 0); dicJJYZList_JGE["JZ20"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ20"], 0); } if (JgIsZero)//Èô´æÔÚÓвÄÁÏÓÃÁ¿¡¢Î޲ÄÁϼ۸ñµÄÇé¿ö£¬ÔòËã³öµıí¼ۡ¢±¨¼۵¥ÐÐÇéÁϼ۸ÄΪ¸ºÊýÏÔʾ @@ -12796,7 +12823,7 @@ namespace GThinking.N_XLXSBJ { string[] strJJYZZ = sUpdJJYZList.ToString().Trim().Split('|'); sZDXJGS = sZDXJGS.Replace("JZ01", strJJYZZ[0]).Replace("JZ02", strJJYZZ[1]).Replace("JZ03", strJJYZZ[2]).Replace("JZ04", strJJYZZ[3]).Replace("JZ05", strJJYZZ[4]); - sZDXJGS = sZDXJGS.Replace("JZ06", strJJYZZ[5]).Replace("JZ07", strJJYZZ[6]).Replace("JZ08", strJJYZZ[7]).Replace("JZ09", strJJYZZ[8]).Replace("JZ10", strJJYZZ[9]); + sZDXJGS = sZDXJGS.Replace("JZ06", strJJYZZ[5]).Replace("JZ07", strJJYZZ[6]).Replace("JZ08", strJJYZZ[7]).Replace("JZ09", strJJYZZ[8]).Replace("JZ10", strJJYZZ[9]).Replace("JZ11", strJJYZZ[10]).Replace("JZ12", strJJYZZ[11]).Replace("JZ13", strJJYZZ[12]).Replace("JZ14", strJJYZZ[13]).Replace("JZ15", strJJYZZ[14]).Replace("JZ16", strJJYZZ[15]).Replace("JZ17", strJJYZZ[16]).Replace("JZ18", strJJYZZ[17]).Replace("JZ19", strJJYZZ[18]).Replace("JZ20", strJJYZZ[19]); } double dZDXJ = 0; gtExpression exp = new gtExpression(); @@ -18114,7 +18141,7 @@ namespace GThinking.N_XLXSBJ Result.Add("JZ07", 0); Result.Add("JZ08", 0); Result.Add("JZ09", 0); - Result.Add("JZ10", 0); + Result.Add("JZ10", 0); Result.Add("JZ11", 0); Result.Add("JZ12", 0); Result.Add("JZ13", 0); Result.Add("JZ14", 0); Result.Add("JZ15", 0); Result.Add("JZ16", 0); Result.Add("JZ17", 0); Result.Add("JZ18", 0); Result.Add("JZ19", 0); Result.Add("JZ20", 0); } if (XLBJDUtils.IsJGFJGBMX(sBJRQ, sXLXHID, sXLGGID, sXLBZID, sDYDJID)) @@ -18498,7 +18525,7 @@ namespace GThinking.N_XLXSBJ Result["JZ07"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ07"], 0); Result["JZ08"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ08"], 0); Result["JZ09"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ09"], 0); - Result["JZ10"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ10"], 0); + Result["JZ10"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ10"], 0); Result["JZ11"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ11"], 0); Result["JZ12"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ12"], 0); Result["JZ13"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ13"], 0); Result["JZ14"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ14"], 0); Result["JZ15"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ15"], 0); Result["JZ16"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ16"], 0); Result["JZ17"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ17"], 0); Result["JZ18"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ18"], 0); Result["JZ19"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ19"], 0); Result["JZ20"] = CMISproConvert.StrToFloat(dicJGBTZYZGS_JGE["JZ20"], 0); } if (JgIsZero)//Èô´æÔÚÓвÄÁÏÓÃÁ¿¡¢Î޲ÄÁϼ۸ñµÄÇé¿ö£¬ÔòËã³öµıí¼ۡ¢±¨¼۵¥ÐÐÇéÁϼ۸ÄΪ¸ºÊýÏÔʾ diff --git a/XLBJD_BDOBill.cs b/XLBJD_BDOBill.cs index c282d6a..b554f07 100644 --- a/XLBJD_BDOBill.cs +++ b/XLBJD_BDOBill.cs @@ -3458,10 +3458,16 @@ namespace GThinking.N_XLXSBJ SQL.Add(" case when ((ISNULL(XLXSBJYLZD_WPID,' ')= '0060' or ISNULL(XLXSBJYLZD_WPID,' ')= 'ZZZZ') and isnull(XLXSBJYLZDMX_BZDBZ,'N') ='Y' and isnull(XLXSBJYLZDMX_BJDXH,0) <> 0) then 'N' "); SQL.Add(" when (ISNULL(XLXSBJYLZD_WPID,' ')<> ' ' and isnull(XLXSBJYLZDMX_BJDXH,0) <> 0) then 'Y' "); SQL.Add(" else 'N' end as HasYLDZSQ, "); - SQL.Add(" case when isnull(XLXSJGB_MXBH,' ')='JGB' then ' ' else rtrim(convert(char,XLXSBJDJJYZ_YZZ01))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ02))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ03))"); - SQL.Add(" ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ04))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ05))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ06))"); - SQL.Add(" ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ07))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ08))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ09))"); - SQL.Add(" ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YZZ10))||'|'||rtrim(convert(char,XLXSBJDJJYZ_YSJDZ)) end as UpdJJYZList,XLXSBJDMX_BJLY,XLXSBJDMX_BJTJCZ,case when isnull(XLXSBJDMXFD_BJDID,' ') = ' ' then 'N' else 'Y' end as HasFDJL,"); + SQL.Add(" case when isnull(XLXSJGB_MXBH,' ')='JGB' then ' ' else "); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); // ¸ñʽ»¯ΪÁ½λÊý×Ö "04", "05", ... + string fieldName = "XLXSBJDJJYZ_YZZ" + num; + if(i>1) + SQL.Add(" ||'|'|| "); + SQL.Add(" rtrim(convert(char," + fieldName + ")) "); + } + SQL.Add(" ||'|'||rtrim(convert(char,XLXSBJDJJYZ_YSJDZ)) end as UpdJJYZList,XLXSBJDMX_BJLY,XLXSBJDMX_BJTJCZ,case when isnull(XLXSBJDMXFD_BJDID,' ') = ' ' then 'N' else 'Y' end as HasFDJL,"); SQL.Add(" XLXSBJDMX_DZSC,XLXSBJDMX_BJDHQCLCBTZ,XLXSBJDMX_ZDXJBJDID,XLXSBJDMX_ZDXJBJDXH,XLXSBJDMX_XDXLBZID,XLXSBJDMX_XDXLXHID,XLXSBJDMX_JGBBJTZ,isnull(XLXSBJBZTXS_TXS,' ') as BZTXYS,XLXSBJDMX_JGFBZ, "); if (!_sBZBJDIDFilter.Equals("")) { @@ -4047,8 +4053,8 @@ namespace GThinking.N_XLXSBJ string[] strJJYZZ = GetField("UpdJJYZList").ToString().Trim().Split('|'); sql.Clear(); sql.Add("insert into XLXSBJDJJYZ(XLXSBJDJJYZ_BJDID,XLXSBJDJJYZ_XH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,"); - sql.Add(" XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YSJDZ)"); - sql.Add(" values(:pBJDID,:pBJDXH,:pYZZ01,:pYZZ02,:pYZZ03,:pYZZ04,:pYZZ05,:pYZZ06,:pYZZ07,:pYZZ08,:pYZZ09,:pYZZ10,:pYSJDZ)"); + sql.Add(" XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,XLXSBJDJJYZ_YZZ11,XLXSBJDJJYZ_YZZ12,XLXSBJDJJYZ_YZZ13,XLXSBJDJJYZ_YZZ14,XLXSBJDJJYZ_YZZ15,XLXSBJDJJYZ_YZZ16,XLXSBJDJJYZ_YZZ17,XLXSBJDJJYZ_YZZ18,XLXSBJDJJYZ_YZZ19,XLXSBJDJJYZ_YZZ20,XLXSBJDJJYZ_YSJDZ)"); + sql.Add(" values(:pBJDID,:pBJDXH,:pYZZ01,:pYZZ02,:pYZZ03,:pYZZ04,:pYZZ05,:pYZZ06,:pYZZ07,:pYZZ08,:pYZZ09,:pYZZ10,:pYZZ11,:pYZZ12,:pYZZ13,:pYZZ14,:pYZZ15,:pYZZ16,:pYZZ17,:pYZZ18,:pYZZ19,:pYZZ20,:pYSJDZ)"); sql.ParamByName("pBJDID").Value = _BJDID; sql.ParamByName("pBJDXH").Value = GetField("XLXSBJDMX_XH"); sql.ParamByName("pYZZ01").Value = CMISproConvert.StrToFloat(strJJYZZ[0], 0); @@ -4061,7 +4067,17 @@ namespace GThinking.N_XLXSBJ sql.ParamByName("pYZZ08").Value = CMISproConvert.StrToFloat(strJJYZZ[7], 0); sql.ParamByName("pYZZ09").Value = CMISproConvert.StrToFloat(strJJYZZ[8], 0); sql.ParamByName("pYZZ10").Value = CMISproConvert.StrToFloat(strJJYZZ[9], 0); - sql.ParamByName("pYSJDZ").Value = CMISproConvert.StrToFloat(strJJYZZ[10], 0); + sql.ParamByName("pYZZ11").Value = CMISproConvert.StrToFloat(strJJYZZ[10], 0); + sql.ParamByName("pYZZ12").Value = CMISproConvert.StrToFloat(strJJYZZ[11], 0); + sql.ParamByName("pYZZ13").Value = CMISproConvert.StrToFloat(strJJYZZ[12], 0); + sql.ParamByName("pYZZ14").Value = CMISproConvert.StrToFloat(strJJYZZ[13], 0); + sql.ParamByName("pYZZ15").Value = CMISproConvert.StrToFloat(strJJYZZ[14], 0); + sql.ParamByName("pYZZ16").Value = CMISproConvert.StrToFloat(strJJYZZ[15], 0); + sql.ParamByName("pYZZ17").Value = CMISproConvert.StrToFloat(strJJYZZ[16], 0); + sql.ParamByName("pYZZ18").Value = CMISproConvert.StrToFloat(strJJYZZ[17], 0); + sql.ParamByName("pYZZ19").Value = CMISproConvert.StrToFloat(strJJYZZ[18], 0); + sql.ParamByName("pYZZ20").Value = CMISproConvert.StrToFloat(strJJYZZ[19], 0); + sql.ParamByName("pYSJDZ").Value = CMISproConvert.StrToFloat(strJJYZZ[20], 0); dberp.ExecSQL(sql); } @@ -4257,7 +4273,7 @@ namespace GThinking.N_XLXSBJ string[] strJJYZZ = GetField("UpdJJYZList").ToString().Trim().Split('|'); sql.Clear(); sql.Add("update XLXSBJDJJYZ set XLXSBJDJJYZ_XH=:pBJDXH,XLXSBJDJJYZ_YZZ01=:pYZZ01,XLXSBJDJJYZ_YZZ02=:pYZZ02,XLXSBJDJJYZ_YZZ03=:pYZZ03,XLXSBJDJJYZ_YZZ04=:pYZZ04,XLXSBJDJJYZ_YZZ05=:pYZZ05,"); - sql.Add(" XLXSBJDJJYZ_YZZ06=:pYZZ06,XLXSBJDJJYZ_YZZ07=:pYZZ07,XLXSBJDJJYZ_YZZ08=:pYZZ08,XLXSBJDJJYZ_YZZ09=:pYZZ09,XLXSBJDJJYZ_YZZ10=:pYZZ10,XLXSBJDJJYZ_YSJDZ=:pYSJDZ "); + sql.Add(" XLXSBJDJJYZ_YZZ06=:pYZZ06,XLXSBJDJJYZ_YZZ07=:pYZZ07,XLXSBJDJJYZ_YZZ08=:pYZZ08,XLXSBJDJJYZ_YZZ09=:pYZZ09,XLXSBJDJJYZ_YZZ10=:pYZZ10,XLXSBJDJJYZ_YZZ11=:pYZZ11,XLXSBJDJJYZ_YZZ12=:pYZZ12,XLXSBJDJJYZ_YZZ13=:pYZZ13,XLXSBJDJJYZ_YZZ14=:pYZZ14,XLXSBJDJJYZ_YZZ15=:pYZZ15,XLXSBJDJJYZ_YZZ16=:pYZZ16,XLXSBJDJJYZ_YZZ17=:pYZZ17,XLXSBJDJJYZ_YZZ18=:pYZZ18,XLXSBJDJJYZ_YZZ19=:pYZZ19,XLXSBJDJJYZ_YZZ20=:pYZZ20,XLXSBJDJJYZ_YSJDZ=:pYSJDZ "); sql.Add(" where XLXSBJDJJYZ_BJDID=:pBJDID and XLXSBJDJJYZ_XH=:OLD_XLXSBJDMX_XH"); sql.ParamByName("pBJDID").Value = _BJDID; sql.ParamByName("OLD_XLXSBJDMX_XH").Value = GetField("OLD_XLXSBJDMX_XH"); @@ -4272,7 +4288,17 @@ namespace GThinking.N_XLXSBJ sql.ParamByName("pYZZ08").Value = CMISproConvert.StrToFloat(strJJYZZ[7], 0); sql.ParamByName("pYZZ09").Value = CMISproConvert.StrToFloat(strJJYZZ[8], 0); sql.ParamByName("pYZZ10").Value = CMISproConvert.StrToFloat(strJJYZZ[9], 0); - sql.ParamByName("pYSJDZ").Value = CMISproConvert.StrToFloat(strJJYZZ[10], 0); + sql.ParamByName("pYZZ11").Value = CMISproConvert.StrToFloat(strJJYZZ[10], 0); + sql.ParamByName("pYZZ12").Value = CMISproConvert.StrToFloat(strJJYZZ[11], 0); + sql.ParamByName("pYZZ13").Value = CMISproConvert.StrToFloat(strJJYZZ[12], 0); + sql.ParamByName("pYZZ14").Value = CMISproConvert.StrToFloat(strJJYZZ[13], 0); + sql.ParamByName("pYZZ15").Value = CMISproConvert.StrToFloat(strJJYZZ[14], 0); + sql.ParamByName("pYZZ16").Value = CMISproConvert.StrToFloat(strJJYZZ[15], 0); + sql.ParamByName("pYZZ17").Value = CMISproConvert.StrToFloat(strJJYZZ[16], 0); + sql.ParamByName("pYZZ18").Value = CMISproConvert.StrToFloat(strJJYZZ[17], 0); + sql.ParamByName("pYZZ19").Value = CMISproConvert.StrToFloat(strJJYZZ[18], 0); + sql.ParamByName("pYZZ20").Value = CMISproConvert.StrToFloat(strJJYZZ[19], 0); + sql.ParamByName("pYSJDZ").Value = CMISproConvert.StrToFloat(strJJYZZ[20], 0); dberp.ExecSQL(sql); } diff --git a/XLBJD_CLCBInfo.aspx.cs b/XLBJD_CLCBInfo.aspx.cs index 5d37d85..e9b0e12 100644 --- a/XLBJD_CLCBInfo.aspx.cs +++ b/XLBJD_CLCBInfo.aspx.cs @@ -230,27 +230,19 @@ namespace GThinking.N_XLXSBJ if (bZSBJZC) { strSQL.AppendLine(",round(XLXSBJDJJYZ_YZZ01*100*100/81.2655989526499/71.3980341706337,6) as SCRGF "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ01 as TZYZ_JZ01 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ02 as TZYZ_JZ02 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ03 as TZYZ_JZ03 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ04 as TZYZ_JZ04 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ05 as TZYZ_JZ05 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ06 as TZYZ_JZ06 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ07 as TZYZ_JZ07 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ08 as TZYZ_JZ08 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ09 as TZYZ_JZ09 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ10 as TZYZ_JZ10 "); + string sYZZFields_1 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_1 += ",XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + " as TZYZ_JZ" + i.ToString().PadLeft(2, '0') + " "; + } + strSQL.AppendLine(sYZZFields_1); + dt1.Columns.Add("SCRGF", typeof(double)); - dt1.Columns.Add("TZYZ_JZ01", typeof(double)); - dt1.Columns.Add("TZYZ_JZ02", typeof(double)); - dt1.Columns.Add("TZYZ_JZ03", typeof(double)); - dt1.Columns.Add("TZYZ_JZ04", typeof(double)); - dt1.Columns.Add("TZYZ_JZ05", typeof(double)); - dt1.Columns.Add("TZYZ_JZ06", typeof(double)); - dt1.Columns.Add("TZYZ_JZ07", typeof(double)); - dt1.Columns.Add("TZYZ_JZ08", typeof(double)); - dt1.Columns.Add("TZYZ_JZ09", typeof(double)); - dt1.Columns.Add("TZYZ_JZ10", typeof(double)); + for (int i = 1; i <= 20; i++) + { + string colName = "TZYZ_JZ" + i.ToString("D2"); + dt1.Columns.Add(colName, typeof(double)); + } SQL.Clear(); SQL.Add("select XLXSTZYZ_YZID, XLXSTZYZ_YZMC,XLXSTZYZ_JJFS "); SQL.Add(" from XLXSTZYZ"); @@ -554,16 +546,12 @@ namespace GThinking.N_XLXSBJ if (bZSBJZC) { dtrow["SCRGF"] = CMISproConvert.StrToFloat(towQry["SCRGF"].ToString().Trim()); - dtrow["TZYZ_JZ01"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ01"].ToString().Trim()); - dtrow["TZYZ_JZ02"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ02"].ToString().Trim()); - dtrow["TZYZ_JZ03"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ03"].ToString().Trim()); - dtrow["TZYZ_JZ04"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ04"].ToString().Trim()); - dtrow["TZYZ_JZ05"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ05"].ToString().Trim()); - dtrow["TZYZ_JZ06"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ06"].ToString().Trim()); - dtrow["TZYZ_JZ07"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ07"].ToString().Trim()); - dtrow["TZYZ_JZ08"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ08"].ToString().Trim()); - dtrow["TZYZ_JZ09"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ09"].ToString().Trim()); - dtrow["TZYZ_JZ10"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ10"].ToString().Trim()); + for (int i = 1; i <= 20; i++) + { + string colName = "TZYZ_JZ" + i.ToString("D2"); + object value = towQry[colName]; // »ñȡԭʼֵ + dtrow[colName] = CMISproConvert.StrToFloat(value.ToString().Trim()); + } } if (bXSFBJYY) @@ -1194,27 +1182,17 @@ namespace GThinking.N_XLXSBJ if (bZSBJZC) { strSQL.AppendLine(",round(XLXSBJDJJYZ_YZZ01*100*100/81.2655989526499/71.3980341706337,6) as SCRGF "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ01 as TZYZ_JZ01 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ02 as TZYZ_JZ02 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ03 as TZYZ_JZ03 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ04 as TZYZ_JZ04 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ05 as TZYZ_JZ05 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ06 as TZYZ_JZ06 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ07 as TZYZ_JZ07 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ08 as TZYZ_JZ08 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ09 as TZYZ_JZ09 "); - strSQL.AppendLine(",XLXSBJDJJYZ_YZZ10 as TZYZ_JZ10 "); + for (int i = 1; i <= 20; i++) + { + string num = i.ToString("D2"); + strSQL.AppendLine(",XLXSBJDJJYZ_YZZ" + num + " as TZYZ_JZ" + num + " "); + } dt1.Columns.Add("SCRGF", typeof(double)); - dt1.Columns.Add("TZYZ_JZ01", typeof(double)); - dt1.Columns.Add("TZYZ_JZ02", typeof(double)); - dt1.Columns.Add("TZYZ_JZ03", typeof(double)); - dt1.Columns.Add("TZYZ_JZ04", typeof(double)); - dt1.Columns.Add("TZYZ_JZ05", typeof(double)); - dt1.Columns.Add("TZYZ_JZ06", typeof(double)); - dt1.Columns.Add("TZYZ_JZ07", typeof(double)); - dt1.Columns.Add("TZYZ_JZ08", typeof(double)); - dt1.Columns.Add("TZYZ_JZ09", typeof(double)); - dt1.Columns.Add("TZYZ_JZ10", typeof(double)); + for (int i = 1; i <= 20; i++) + { + string colName = "TZYZ_JZ" + i.ToString("D2"); + dt1.Columns.Add(colName, typeof(double)); + } SQL.Clear(); SQL.Add("select XLXSTZYZ_YZID, XLXSTZYZ_YZMC,XLXSTZYZ_JJFS "); SQL.Add(" from XLXSTZYZ"); @@ -1423,16 +1401,11 @@ namespace GThinking.N_XLXSBJ if (bZSBJZC) { dtrow["SCRGF"] = CMISproConvert.StrToFloat(towQry["SCRGF"].ToString().Trim()); - dtrow["TZYZ_JZ01"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ01"].ToString().Trim()); - dtrow["TZYZ_JZ02"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ02"].ToString().Trim()); - dtrow["TZYZ_JZ03"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ03"].ToString().Trim()); - dtrow["TZYZ_JZ04"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ04"].ToString().Trim()); - dtrow["TZYZ_JZ05"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ05"].ToString().Trim()); - dtrow["TZYZ_JZ06"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ06"].ToString().Trim()); - dtrow["TZYZ_JZ07"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ07"].ToString().Trim()); - dtrow["TZYZ_JZ08"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ08"].ToString().Trim()); - dtrow["TZYZ_JZ09"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ09"].ToString().Trim()); - dtrow["TZYZ_JZ10"] = CMISproConvert.StrToFloat(towQry["TZYZ_JZ10"].ToString().Trim()); + for (int i = 1; i <= 20; i++) + { + string col = "TZYZ_JZ" + i.ToString("D2"); + dtrow[col] = CMISproConvert.StrToFloat(towQry[col].ToString().Trim()); + } } if (bXSFBJYY) @@ -2332,10 +2305,20 @@ namespace GThinking.N_XLXSBJ SQL.Clear(); SQL.Add(" merge into V_XSBJJSJGB tar "); SQL.Add(" using ( "); - SQL.Add("select BJDID,BJDXH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10 "); + string sYZZFields_3 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_3 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("select BJDID,BJDXH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ," + sYZZFields_3 + " "); SQL.Add(" from "); SQL.Add("("); - SQL.Add(" select XLXSBJDJJYZ_BJDID as BJDID,XLXSBJDJJYZ_XH as BJDXH,XLXSBJDJJYZ_YZZ01,XLXSBJDJJYZ_YZZ02,XLXSBJDJJYZ_YZZ03,XLXSBJDJJYZ_YZZ04,XLXSBJDJJYZ_YZZ05,XLXSBJDJJYZ_YZZ06,XLXSBJDJJYZ_YZZ07,XLXSBJDJJYZ_YZZ08,XLXSBJDJJYZ_YZZ09,XLXSBJDJJYZ_YZZ10,"); + string sYZZFields_4 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_4 += "XLXSBJDJJYZ_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" select XLXSBJDJJYZ_BJDID as BJDID,XLXSBJDJJYZ_XH as BJDXH," + sYZZFields_4 + ","); SQL.Add(" ("); SQL.Add(string.Format("XLXSBJDJJYZ_YZZ{0}", dsJGBYZ.Tables[0].Rows[0]["XLXSJGBYZ_YZID"].ToString().Trim().Replace("JZ", ""))); diff --git a/XLJGB_CLJGTZList.aspx.cs b/XLJGB_CLJGTZList.aspx.cs index 526e8d2..56e0c46 100644 --- a/XLJGB_CLJGTZList.aspx.cs +++ b/XLJGB_CLJGTZList.aspx.cs @@ -3413,14 +3413,24 @@ namespace GThinking.N_XLXSBJ SQL.Clear(); SQL.Add(" merge into XLXSJGBMX tar "); SQL.Add(" using ( "); - SQL.Add("select JGBID,XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + string sYZZFields_1 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_1 += "XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("select JGBID,XH," + sYZZFields_1 + " "); if (dicJGBTJYZ.Count > 0 || dicJGBFGQCPYZ.Count > 0) SQL.Add(",JSYCBZ"); //if (dicJGBFGQCPYZ.Count > 0) // SQL.Add(",JGBTJYZYCBZ"); SQL.Add(" from "); SQL.Add("("); - SQL.Add(" select XLXSJGBYZZ0_JGBID as JGBID,XLXSJGBYZZ0_XH as XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + string sYZZFields_2 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_2 += "XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" select XLXSJGBYZZ0_JGBID as JGBID,XLXSJGBYZZ0_XH as XH," + sYZZFields_2 + " "); if (dicJGBTJYZ.Count > 0 || dicJGBFGQCPYZ.Count > 0) { SQL.Add(" , case "); @@ -5135,7 +5145,11 @@ namespace GThinking.N_XLXSBJ SQL.Add(string.Format(",SUM(XLXSJGBYZZC_YZZ) as YZZ{0},:pTIMESTAMP,:pWHR,:pWHRID,:pWHSJ", sTJYZ[i].Trim().Replace("JZ", ""))); SQL.Add(" from XLXSJGBMX "); - SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=XLXSJGBMX_XLXHID and XLXSBJCPYS_DYDJID=XLXSJGBMX_DYDJID "); + SQL.Add("left join XLXHB on XLXHB_XLXHID=XLXSJGBMX_XLXHID "); + SQL.Add("left join XLXSBJXLGGTHB XLXSBJXLGGTHB_JGB10 on XLXSBJXLGGTHB_JGB10.XLXSBJXLGGTHB_XLGGID=XLXSJGBMX_XLGGID "); + SQL.Add("left join XLGGB on XLGGB_XLGGID = isnull(XLXSBJXLGGTHB_JGB10.XLXSBJXLGGTHB_XLGGIDCH,' ') and XLGGB_XLGGJDGZ = isnull(XLXHB_XLGGJDGZ,'0') "); + SQL.Add("left join XLDTJMZHB on XLDTJMZHB_DTJMZHID=XLGGB_DTJMZHID "); + SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=XLXSJGBMX_XLXHID and XLXSBJCPYS_DYDJID=XLXSJGBMX_DYDJID and CONVERT(float,XLXSBJCPYS_XLYSID)=XLDTJMZHB_DTJM1 "); if (!sJGCZBID.Trim().Equals("")) { SQL.Add(" left join XLXSCLQD on XLXSCLQD_XLXHID=XLXSJGBMX_XLXHID and XLXSCLQD_XLGGID=XLXSJGBMX_XLGGID and XLXSCLQD_DYDJID=XLXSJGBMX_DYDJID "); @@ -6248,20 +6262,30 @@ namespace GThinking.N_XLXSBJ */ Dictionary dicJGBTJYZ = XLBJDInfo.GetJGBBTYZ(sJGBID); Dictionary dicJGBFGQCPYZ = XLBJDInfo.GetJGBFGQCPYZ(sJGBID); - + SQL.Clear(); SQL.Add(" merge into XLXSJGBMX tar "); SQL.Add(" using ( "); - SQL.Add("select XLXSCLQD_CLZL,JGBID,XH," + sJDSQL + " as JDYZZ," + sKDSQL + " as KDYZZ," + sJJSQL + " as JJYZZ," + sSXSQL + " as SXYZZ"); + string sYZZFields_3 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_3 += "XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add("select XLXSCLQD_CLZL,JGBID,XH," + sYZZFields_3 + " "); if (dicJGBTJYZ.Count > 0 || dicJGBFGQCPYZ.Count > 0) SQL.Add(",JSYCBZ"); //if (dicJGBFGQCPYZ.Count > 0) // SQL.Add(",JGBTJYZYCBZ"); SQL.Add(" from "); SQL.Add("("); - SQL.Add(" select isnull(XLXSCLQD_CLZL,0) as XLXSCLQD_CLZL,XLXSJGBYZZ0_JGBID as JGBID,XLXSJGBYZZ0_XH as XH ,"); + string sYZZFields_4 = ""; + for (int i = 1; i <= 20; i++) + { + sYZZFields_4 += "XLXSJGBYZZ0_YZZ" + i.ToString().PadLeft(2, '0') + (i < 20 ? "," : ""); + } + SQL.Add(" select isnull(XLXSCLQD_CLZL,0) as XLXSCLQD_CLZL,XLXSJGBYZZ0_JGBID as JGBID,XLXSJGBYZZ0_XH as XH," + sYZZFields_4 + " "); if (dicJGBTJYZ.Count > 0 || dicJGBFGQCPYZ.Count > 0) { SQL.Add("case "); @@ -8671,7 +8695,11 @@ namespace GThinking.N_XLXSBJ SQL.Add(string.Format(",SUM(XLXSJGBYZZC_YZZ) as YZZ{0},:pTIMESTAMP,:pWHR,:pWHRID,:pWHSJ", sTJYZ[i].Trim().Replace("JZ", ""))); SQL.Add(" from XLXSJGBMX "); - SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=XLXSJGBMX_XLXHID and XLXSBJCPYS_DYDJID=XLXSJGBMX_DYDJID "); + SQL.Add("left join XLXHB on XLXHB_XLXHID=XLXSJGBMX_XLXHID "); + SQL.Add("left join XLXSBJXLGGTHB XLXSBJXLGGTHB_JGB10 on XLXSBJXLGGTHB_JGB10.XLXSBJXLGGTHB_XLGGID=XLXSJGBMX_XLGGID "); + SQL.Add("left join XLGGB on XLGGB_XLGGID = isnull(XLXSBJXLGGTHB_JGB10.XLXSBJXLGGTHB_XLGGIDCH,' ') and XLGGB_XLGGJDGZ = isnull(XLXHB_XLGGJDGZ,'0') "); + SQL.Add("left join XLDTJMZHB on XLDTJMZHB_DTJMZHID=XLGGB_DTJMZHID "); + SQL.Add(" LEFT JOIN XLXSBJCPYS ON XLXSBJCPYS_XLJBXHID=XLXSJGBMX_XLXHID and XLXSBJCPYS_DYDJID=XLXSJGBMX_DYDJID and CONVERT(float,XLXSBJCPYS_XLYSID)=XLDTJMZHB_DTJM1 "); if (!sJGCZBID.Trim().Equals("")) { SQL.Add(" left join XLXSCLQD on XLXSCLQD_XLXHID=XLXSJGBMX_XLXHID and XLXSCLQD_XLGGID=XLXSJGBMX_XLGGID and XLXSCLQD_DYDJID=XLXSJGBMX_DYDJID "); diff --git a/XLJGB_JGBMX.cs b/XLJGB_JGBMX.cs index be77d24..e76fcef 100644 --- a/XLJGB_JGBMX.cs +++ b/XLJGB_JGBMX.cs @@ -372,7 +372,7 @@ namespace GThinking.N_XLXSBJ TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); TSQL sql = new TSQL(dberp); sql.Add("select XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,"); - sql.Add(" XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + sql.Add(" XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10,XLXSJGBYZZ0_YZZ11,XLXSJGBYZZ0_YZZ12,XLXSJGBYZZ0_YZZ13,XLXSJGBYZZ0_YZZ14,XLXSJGBYZZ0_YZZ15,XLXSJGBYZZ0_YZZ16,XLXSJGBYZZ0_YZZ17,XLXSJGBYZZ0_YZZ18,XLXSJGBYZZ0_YZZ19,XLXSJGBYZZ0_YZZ20 "); sql.Add(" from XLXSJGBYZZ0 where XLXSJGBYZZ0_JGBID=:pJGBID and XLXSJGBYZZ0_XH=:pXH "); sql.ParamByName("pJGBID").Value = sJGBID; sql.ParamByName("pXH").Value = dXH; diff --git a/XLJGB_JGBMXInfo.aspx.cs b/XLJGB_JGBMXInfo.aspx.cs index 6dcd2fe..24d9082 100644 --- a/XLJGB_JGBMXInfo.aspx.cs +++ b/XLJGB_JGBMXInfo.aspx.cs @@ -685,6 +685,16 @@ namespace GThinking.N_XLXSBJ XLJGB_JGBMX.SetValueToCtls("JZ08", 0, divTZYZ.Controls); XLJGB_JGBMX.SetValueToCtls("JZ09", 0, divTZYZ.Controls); XLJGB_JGBMX.SetValueToCtls("JZ10", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ11", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ12", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ13", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ14", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ15", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ16", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ17", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ18", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ19", 0, divTZYZ.Controls); + XLJGB_JGBMX.SetValueToCtls("JZ20", 0, divTZYZ.Controls); } _txt_TextChanged(null, null); diff --git a/XLJGB_JGBMXList.aspx.cs b/XLJGB_JGBMXList.aspx.cs index 86ee8c8..eed1380 100644 --- a/XLJGB_JGBMXList.aspx.cs +++ b/XLJGB_JGBMXList.aspx.cs @@ -615,7 +615,7 @@ namespace GThinking.N_XLXSBJ // sSQL.AppendLine(string.Format(",TZYZ_{0}", sYZIDs[i].Trim())); //} sSQL.AppendLine(" ,XLXSJGBYZZ0_YZZ01 as TZYZ_JZ01,XLXSJGBYZZ0_YZZ02 as TZYZ_JZ02,XLXSJGBYZZ0_YZZ03 as TZYZ_JZ03,XLXSJGBYZZ0_YZZ04 as TZYZ_JZ04,XLXSJGBYZZ0_YZZ05 as TZYZ_JZ05 "); - sSQL.AppendLine(" ,XLXSJGBYZZ0_YZZ06 as TZYZ_JZ06,XLXSJGBYZZ0_YZZ07 as TZYZ_JZ07,XLXSJGBYZZ0_YZZ08 as TZYZ_JZ08,XLXSJGBYZZ0_YZZ09 as TZYZ_JZ09,XLXSJGBYZZ0_YZZ10 as TZYZ_JZ10 "); + sSQL.AppendLine(" ,XLXSJGBYZZ0_YZZ06 as TZYZ_JZ06,XLXSJGBYZZ0_YZZ07 as TZYZ_JZ07,XLXSJGBYZZ0_YZZ08 as TZYZ_JZ08,XLXSJGBYZZ0_YZZ09 as TZYZ_JZ09,XLXSJGBYZZ0_YZZ10 as TZYZ_JZ10,XLXSJGBYZZ0_YZZ11 as TZYZ_JZ11,XLXSJGBYZZ0_YZZ12 as TZYZ_JZ12,XLXSJGBYZZ0_YZZ13 as TZYZ_JZ13,XLXSJGBYZZ0_YZZ14 as TZYZ_JZ14,XLXSJGBYZZ0_YZZ15 as TZYZ_JZ15,XLXSJGBYZZ0_YZZ16 as TZYZ_JZ16,XLXSJGBYZZ0_YZZ17 as TZYZ_JZ17,XLXSJGBYZZ0_YZZ18 as TZYZ_JZ18,XLXSJGBYZZ0_YZZ19 as TZYZ_JZ19,XLXSJGBYZZ0_YZZ20 as TZYZ_JZ20 "); sSQL.AppendLine(" from XLXSJGBMX "); sSQL.AppendLine(" left join XLXSBJXLGGTHB XLXSBJXLGGTHB_Q on XLXSBJXLGGTHB_Q.XLXSBJXLGGTHB_XLGGID = XLXSJGBMX_XLGGID "); @@ -2299,8 +2299,10 @@ namespace GThinking.N_XLXSBJ XLBJDUtils.SyncXLXSBJXLGGTHB_ByXLXSJGBMX_Batch(dberp, CMISproSessionManager.GetCurrentSession(), sJGBID); SQL.Clear(); - SQL.Add("insert into XLXSJGBYZZ0(XLXSJGBYZZ0_JGBID,XLXSJGBYZZ0_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10) "); + SQL.Add("insert into XLXSJGBYZZ0(XLXSJGBYZZ0_JGBID,XLXSJGBYZZ0_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + SQL.Add(" ,XLXSJGBYZZ0_YZZ11,XLXSJGBYZZ0_YZZ12,XLXSJGBYZZ0_YZZ13,XLXSJGBYZZ0_YZZ14,XLXSJGBYZZ0_YZZ15,XLXSJGBYZZ0_YZZ16,XLXSJGBYZZ0_YZZ17,XLXSJGBYZZ0_YZZ18,XLXSJGBYZZ0_YZZ19,XLXSJGBYZZ0_YZZ20)"); SQL.Add(" select XLXSJGBMX_JGBID,XLXSJGBMX_XH,XLXSJGBYZZ0_YZZ01,XLXSJGBYZZ0_YZZ02,XLXSJGBYZZ0_YZZ03,XLXSJGBYZZ0_YZZ04,XLXSJGBYZZ0_YZZ05,XLXSJGBYZZ0_YZZ06,XLXSJGBYZZ0_YZZ07,XLXSJGBYZZ0_YZZ08,XLXSJGBYZZ0_YZZ09,XLXSJGBYZZ0_YZZ10 "); + SQL.Add(" ,XLXSJGBYZZ0_YZZ11,XLXSJGBYZZ0_YZZ12,XLXSJGBYZZ0_YZZ13,XLXSJGBYZZ0_YZZ14,XLXSJGBYZZ0_YZZ15,XLXSJGBYZZ0_YZZ16,XLXSJGBYZZ0_YZZ17,XLXSJGBYZZ0_YZZ18,XLXSJGBYZZ0_YZZ19,XLXSJGBYZZ0_YZZ20"); SQL.Add(" from XLXSJGBMX "); SQL.Add(" left join XLXSJGBYZZ0 on XLXSJGBYZZ0_JGBID= XLXSJGBMX_JGBID and XLXSJGBYZZ0_XH=XLXSJGBMX_SYXH "); SQL.Add(" where XLXSJGBMX_JGBID=:pJGBID and XLXSJGBMX_SYXH>0 "); @@ -3916,7 +3918,7 @@ namespace GThinking.N_XLXSBJ SQL.Add(" :pYXQS as XLXSJGBMX_YXQS,"); SQL.Add(" :pYXQZ as XLXSJGBMX_YXQZ, "); SQL.Add(" round(XLXSJGBYZZ0_YZZ01*100*100/81.2655989526499/71.3980341706337,6) as SCRGF,XLXSJGBYZZ0_YZZ01 as TZYZ_JZ01,XLXSJGBYZZ0_YZZ02 as TZYZ_JZ02,XLXSJGBYZZ0_YZZ03 as TZYZ_JZ03,XLXSJGBYZZ0_YZZ04 as TZYZ_JZ04,XLXSJGBYZZ0_YZZ05 as TZYZ_JZ05 "); - SQL.Add(" ,XLXSJGBYZZ0_YZZ06 as TZYZ_JZ06,XLXSJGBYZZ0_YZZ07 as TZYZ_JZ07,XLXSJGBYZZ0_YZZ08 as TZYZ_JZ08,XLXSJGBYZZ0_YZZ09 as TZYZ_JZ09,XLXSJGBYZZ0_YZZ10 as TZYZ_JZ10, "); + SQL.Add(" ,XLXSJGBYZZ0_YZZ06 as TZYZ_JZ06,XLXSJGBYZZ0_YZZ07 as TZYZ_JZ07,XLXSJGBYZZ0_YZZ08 as TZYZ_JZ08,XLXSJGBYZZ0_YZZ09 as TZYZ_JZ09,XLXSJGBYZZ0_YZZ10 as TZYZ_JZ10,XLXSJGBYZZ0_YZZ11 as TZYZ_JZ11,XLXSJGBYZZ0_YZZ12 as TZYZ_JZ12,XLXSJGBYZZ0_YZZ13 as TZYZ_JZ13,XLXSJGBYZZ0_YZZ14 as TZYZ_JZ14,XLXSJGBYZZ0_YZZ15 as TZYZ_JZ15,XLXSJGBYZZ0_YZZ16 as TZYZ_JZ16,XLXSJGBYZZ0_YZZ17 as TZYZ_JZ17,XLXSJGBYZZ0_YZZ18 as TZYZ_JZ18,XLXSJGBYZZ0_YZZ19 as TZYZ_JZ19,XLXSJGBYZZ0_YZZ20 as TZYZ_JZ20, "); if (sBJU018.Equals("Y")) { SQL.Add(" case when XLXSJGBMX_WSJJM <> 0 then XLXSJGBMX_WSJJM else XLXSJGBMX_WSJJ end as XLXSJGBMX_WSJJ,"); diff --git a/XLXHCPTXWHList.aspx b/XLXHCPTXWHList.aspx index 4fd2f2e..bcf0249 100644 --- a/XLXHCPTXWHList.aspx +++ b/XLXHCPTXWHList.aspx @@ -25,6 +25,10 @@ CodeBehind="XLXHCPTXWHList.aspx.cs" Inherits="GThinking.N_XLXSBJ.XLXHCPTXWHList" + + + + @@ -36,6 +40,8 @@ CodeBehind="XLXHCPTXWHList.aspx.cs" Inherits="GThinking.N_XLXSBJ.XLXHCPTXWHList" + + diff --git a/XLXHCPTXWHList.aspx.cs b/XLXHCPTXWHList.aspx.cs index 74e8b12..e35294f 100644 --- a/XLXHCPTXWHList.aspx.cs +++ b/XLXHCPTXWHList.aspx.cs @@ -76,11 +76,11 @@ namespace GThinking.N_XLXSBJ protected override void BeforeDelete(TDatabase db, ref bool ActionIsDone) { - entity.EntityTable.DeleteSql = " delete from XLXSBJCPYS where XLXSBJCPYS_XLJBXHID=:XLXSBJCPYS_XLJBXHID and XLXSBJCPYS_DYDJID =:XLXSBJCPYS_DYDJID and XLXSBJCPYS_XXJGID =:XLXSBJCPYS_XXJGID"; + entity.EntityTable.DeleteSql = " delete from XLXSBJCPYS where XLXSBJCPYS_XLJBXHID=:XLXSBJCPYS_XLJBXHID and XLXSBJCPYS_DYDJID =:XLXSBJCPYS_DYDJID and XLXSBJCPYS_XXJGID =:XLXSBJCPYS_XXJGID and XLXSBJCPYS_XLYSID=:XLXSBJCPYS_XLYSID "; entity.Param.Add("XLXSBJCPYS_XLJBXHID", this.ContentGrid.SelectedDataKey["XLXSBJCPYS_XLJBXHID"].ToString().Trim()); entity.Param.Add("XLXSBJCPYS_DYDJID", this.ContentGrid.SelectedDataKey["XLXSBJCPYS_DYDJID"].ToString().Trim()); entity.Param.Add("XLXSBJCPYS_XXJGID", this.ContentGrid.SelectedDataKey["XLXSBJCPYS_XXJGID"].ToString().Trim()); - + entity.Param.Add("XLXSBJCPYS_XLYSID", this.ContentGrid.SelectedDataKey["XLXSBJCPYS_XLYSID"].ToString().Trim()); base.BeforeDelete(db, ref ActionIsDone); } @@ -91,7 +91,7 @@ namespace GThinking.N_XLXSBJ private string GetSql() { StringBuilder strSQL = new StringBuilder(); - strSQL.AppendLine(" select XLXSBJCPYS_DYDJID, XLXSBJCPYS_XLJBXHID,XLXSBJCPYS_XXJGID "); + strSQL.AppendLine(" select XLXSBJCPYS_DYDJID, XLXSBJCPYS_XLJBXHID,XLXSBJCPYS_XXJGID,XLXSBJCPYS_XLYSID "); strSQL.AppendLine(" from XLXSBJCPYS "); strSQL.AppendLine(" where 1=1 "); @@ -100,7 +100,7 @@ namespace GThinking.N_XLXSBJ strSQL.AppendLine(" and XLXSBJCPYS_XLJBXHID = :pXLXHID "); entity.Param.Add("pXLXHID", CurQueryEntity.FieldByName("XLXHID").Value.Trim()); } - strSQL.AppendLine(" order by XLXSBJCPYS_XLJBXHID,XLXSBJCPYS_DYDJID,XLXSBJCPYS_XXJGID"); + strSQL.AppendLine(" order by XLXSBJCPYS_XLJBXHID,XLXSBJCPYS_XLYSID,XLXSBJCPYS_DYDJID,XLXSBJCPYS_XXJGID "); return strSQL.ToString(); } diff --git a/obj/Debug/N_XLXSBJA.dll b/obj/Debug/N_XLXSBJA.dll index 73758b8..9f3174d 100644 Binary files a/obj/Debug/N_XLXSBJA.dll and b/obj/Debug/N_XLXSBJA.dll differ diff --git a/obj/Debug/N_XLXSBJA.pdb b/obj/Debug/N_XLXSBJA.pdb index 41ccbd3..043a0ac 100644 Binary files a/obj/Debug/N_XLXSBJA.pdb and b/obj/Debug/N_XLXSBJA.pdb differ diff --git a/obj/Debug/ResolveAssemblyReference.cache b/obj/Debug/ResolveAssemblyReference.cache index afc41e6..51f5d3a 100644 Binary files a/obj/Debug/ResolveAssemblyReference.cache and b/obj/Debug/ResolveAssemblyReference.cache differ