LMES/ClsShowMod.cs
@@ -7960,6 +7960,13 @@ oSc_WorkShopReport.Show(); oMainForm.AddTabPage(oSc_WorkShopReport); break; case "sc_overprodreport": Sc_OverProdReport oSc_OverProdReport = new Sc_OverProdReport(); oSc_OverProdReport.MdiParent = oMain; oSc_OverProdReport.ModCaption = gnmc; oSc_OverProdReport.Show(); oMainForm.AddTabPage(oSc_OverProdReport); break; case "sc_warehousereport": Sc_WareHouseReport oSc_WareHouseReport = new Sc_WareHouseReport(); oSc_WareHouseReport.MdiParent = oMain; Model/²Ö¿â¹ÜÀí/ÌõÂë¹ÜÀí/ClsGy_BarCodeEdit_Model.cs
@@ -45,5 +45,7 @@ public DateTime HBarCodeDate; public string HInnerBillNo; public double HMZ; public double HSplitNum; //æç æ°é } } PayM/bin/x86/Debug/AxInterop.gregn6Lib.dllBinary files differ
PayM/bin/x86/Debug/BLL.dllBinary files differ
PayM/bin/x86/Debug/BLL.pdbBinary files differ
PayM/bin/x86/Debug/DAL.dllBinary files differ
PayM/bin/x86/Debug/DAL.pdbBinary files differ
PayM/bin/x86/Debug/DBUtility.dllBinary files differ
PayM/bin/x86/Debug/DBUtility.pdbBinary files differ
PayM/bin/x86/Debug/Interop.gregn6Lib.dllBinary files differ
PayM/bin/x86/Debug/Model.dllBinary files differ
PayM/bin/x86/Debug/Model.pdbBinary files differ
PayM/bin/x86/Debug/PayM.dllBinary files differ
PayM/bin/x86/Debug/PayM.pdbBinary files differ
PayM/bin/x86/Debug/Pub_Class.dllBinary files differ
PayM/bin/x86/Debug/Pub_Class.pdbBinary files differ
PayM/bin/x86/Debug/Pub_Control.dllBinary files differ
PayM/bin/x86/Debug/Pub_Control.pdbBinary files differ
PayM/bin/x86/Debug/SQLHelper.dllBinary files differ
PayM/bin/x86/Debug/SQLHelper.pdbBinary files differ
PayM/obj/x86/Debug/AxInterop.gregn6Lib.dllBinary files differ
PayM/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cacheBinary files differ
PayM/obj/x86/Debug/Interop.gregn6Lib.dllBinary files differ
PayM/obj/x86/Debug/PayM.csproj.CoreCompileInputs.cache
@@ -1 +1 @@ b14f4fcc24537f5a4b1d1021595a00930f37f5f5 2b98949b87d39f3f48ff12a0b7c639d4a4168873 PayM/obj/x86/Debug/PayM.csproj.GenerateResource.cacheBinary files differ
PayM/obj/x86/Debug/PayM.csproj.ResolveComReference.cacheBinary files differ
PayM/obj/x86/Debug/PayM.csprojAssemblyReference.cacheBinary files differ
PayM/obj/x86/Debug/PayM.dllBinary files differ
PayM/obj/x86/Debug/PayM.pdbBinary files differ
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -607,6 +607,8 @@ string HInter = sArray[0].ToString(); string HInterID = HInter.Replace("\"", ""); string user = sArray[1].ToString(); string HBarCode = sArray[2].ToString().Replace("\"",""); string HComputerName = SystemInformation.ComputerName; //设å¤åç§° //ç¼è¾æé if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, user)) @@ -620,6 +622,32 @@ try { DataSet Ds; string[] NewBarCode; NewBarCode = HBarCode.Split(Convert.ToChar(",")); //å 餿¡ç åè¿è¡å¤æ Ds = oCN.RunProcReturn("exec h_p_Gy_BarCodeBill_MulDelete_Before '" + HInterID + "','" + HBarCode + "'", "h_p_Gy_BarCodeBill_MulDelete_Before", ref DBUtility.ClsPub.sExeReturnInfo); if (Ds == null || Ds.Tables[0].Rows.Count <= 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å 餿¡ç å夿åçé误ï¼"; objJsonResult.data = null; return objJsonResult; } else { if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][0]) == "1") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); objJsonResult.data = null; return objJsonResult; } } //Int64 lngBillKey = 0; //lngBillKey = DBUtility.ClsPub.isLong(HInterID); if (HInterID == "") @@ -630,13 +658,19 @@ objJsonResult.data = null; return objJsonResult; } DataSet Ds; Ds = oCN.RunProcReturn("Select * from h_v_IF_BarCodeBillList Where HItemID in (" + HInterID + ")", "h_v_IF_BarCodeBillList"); if (Ds.Tables[0].Rows.Count != 0) { oCN.BeginTran(); oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")"); //åå ¥ç³»ç»æ¥å¿ for (int i = 0; i <= NewBarCode.Length - 1; i++) { oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "ç½é¡µçå 餿¡ç ï¼" + NewBarCode[i] + "','WMSç³»ç»-æ¡ç æ¡£æ¡å表模å','" + DBUtility.ClsPub.IPAddress + "','å 餿¡ç '", ref DBUtility.ClsPub.sExeReturnInfo); } oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -192,13 +192,24 @@ // objJsonResult.data = null; // return objJsonResult; //} if (HSourceID == 0) //è·åç³»ç»åæ° string Ret = ""; if (oSystemParameter.ShowBill(ref Ret)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "çäº§èµæºæ²¡æéæ©ï¼"; objJsonResult.data = null; return objJsonResult; //å¤æå®¢æ· if (oSystemParameter.omodel.WMS_CampanyName != "é¾å±±æ±½é ") //ç³»ç»åæ° { if (HSourceID == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "çäº§èµæºæ²¡æéæ©ï¼"; objJsonResult.data = null; return objJsonResult; } } } //if (HCenterID == 0) //{ WebAPI/Controllers/SellOutController.cs
@@ -395,7 +395,7 @@ objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = DBUtility.ClsPub.sErrInfo; objJsonResult.data = oBar; objJsonResult.data = WebSoBar; return objJsonResult; } } WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Gy_SplitBarCodeController.cs
New file @@ -0,0 +1,200 @@ using Model; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; using System.Web; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers { public class Gy_SplitBarCodeController : ApiController { //è·åç³»ç»åæ° Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); public DBUtility.ClsPub.Enum_BillStatus BillStatus; public DAL.ClsGy_BarCodeBill_ChaiMa BillNew = new DAL.ClsGy_BarCodeBill_ChaiMa(); //对åºåæ®ç±» private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; /// <summary> /// è¿åæ¡ç ä¿¡æ¯ ///åæ°ï¼string sqlã ///è¿åå¼ï¼objectã /// </summary> [Route("Gy_SplitBarCode/Info")] [HttpGet] public object BarCodeInfo(string HBarCodeNo, string HSplitBarNum) { try { //夿æ¯å¦ææ¥è¯¢æé //if (!DBUtility.ClsPub.Security_Log("Cg_POOrderBillQuery", 1, false, user)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "æ æéæ¥ç!"; // objJsonResult.data = null; // return objJsonResult; //} //æ¥è¯¢æ¡ç ä¿¡æ¯ if(HBarCodeNo != null && HSplitBarNum != null) { SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); ds = oCn.RunProcReturn("select top 1 * from h_v_Gy_SplitBarCode where HBarCode='" + HBarCodeNo + "'", "h_v_Gy_SplitBarCode"); } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "请è¾å ¥æ¡ç ç¼å·ææåæ¡ç æ°"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } //夿æ¯å¦å卿¤æ¡ç if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "æ¡ç ç¼å·ä¸åå¨, æç¤º"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucessï¼"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception e) //æåºå¼å¸¸ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exceptionï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #region æç æ¡ç çæ [Route("Sc_BarCode/Save_SplitBarCode")] [HttpPost] public object Save_SplitBarCode([FromBody] JObject msg) { try { ListModels oListModels = new ListModels(); BillNew = new DAL.ClsGy_BarCodeBill_ChaiMa(); var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string barcode = sArray[0].ToString(); //æ¡ç ç¼å· Int64 splitnum = Convert.ToInt64(sArray[1]); //æç è¡æ° string data = sArray[2].ToString(); //è¡¨ä½æ°æ® string user = sArray[3].ToString(); //ç¨æ·å data = data.Replace("\\", ""); data = data.Replace("\n", ""); //\n List<Model.ClsGy_BarCodeEdit_Model> lsmain = new List<Model.ClsGy_BarCodeEdit_Model>(); lsmain = oListModels.getObjectByJson_Gy_SplitBarCode(data); oCN.BeginTran(); ds = oCN.RunProcReturn("select top 1* from Gy_BarCodeBill where HBarCode='" + barcode + "'", "Gy_BarCodeBill"); bool bResult = true; if (ds != null || ds.Tables[0].Rows.Count > 0) { Model.ClsGy_BarCodeEdit_Model model = new Model.ClsGy_BarCodeEdit_Model(); for (Int64 i = 0; i < splitnum; i++) { model.HEntryID = i + 1; model.HInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"].ToString()); model.HBarCode = DBUtility.ClsPub.isStrNull(lsmain[Convert.ToInt32(i)].HBarCode); model.HQty = DBUtility.ClsPub.isLong(lsmain[Convert.ToInt32(i)].HSplitNum); model.HQty = DBUtility.ClsPub.isInt(lsmain[Convert.ToInt32(i)].HSplitNum); model.HBatchNo = DBUtility.ClsPub.isStrNull(lsmain[Convert.ToInt32(i)].HBatchNo); model.HMaterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HMaterID"].ToString()); model.HUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HUnitID"].ToString()); model.HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"].ToString()); model.HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"].ToString()); model.HEmpID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEmpID"].ToString()); model.HBarCodeType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBarCodeType"].ToString()); model.HItemSubID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HItemSubID"].ToString()); model.HGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HGroupID"].ToString()); model.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSourceInterID"].ToString()); model.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSourceEntryID"].ToString()); model.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"].ToString()); model.HSourceBillType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillType"].ToString()); model.HUseFlag = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HUseFlag"].ToString()); model.HInitQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[0]["HInitQty"].ToString()); model.HSourceID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInitQty"].ToString()); model.HCusID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HCusID"].ToString()); model.HSTOCKORGID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSTOCKORGID"].ToString()); model.HOWNERID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HOWNERID"].ToString()); model.HBarCodeDate = DBUtility.ClsPub.isDate(ds.Tables[0].Rows[0]["HBarCodeDate"].ToString()); model.HInnerBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HInnerBillNo"].ToString()); model.HMZ = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[0]["HMZ"].ToString()); model.HMakeDate = DateTime.Now; model.HMaker = user; BillNew.DetailColl_Mater.Add(model); //ä¿å bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo, barcode); BillNew.DetailColl_Mater.Remove(model); } } if (bResult) { oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "ä¿åæåï¼"; objJsonResult.data = 1; return objJsonResult; } else { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = 1; return objJsonResult; } } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion } } WebAPI/ListModels.cs
@@ -959,6 +959,18 @@ } /// <summary> /// å¤çæ°å¢æ¡ç æç çjson /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsGy_BarCodeEdit_Model> getObjectByJson_Gy_SplitBarCode(string jsonString) { //jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsGy_BarCodeEdit_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_BarCodeEdit_Model>>(jsonString); return list; } /// <summary> /// å¤çåºåç¶æè¡¨çjson /// </summary> /// <param name="jsonString"></param> WebAPI/Models/ClsGy_ProcPrice.cs
@@ -10,7 +10,7 @@ public long HMaterIDCol { get; set; } public long HProcIDCol { get; set; } public long HSourceIDCol { get; set; } public long HPriceCol { get; set; } public decimal HPriceCol { get; set; } public DateTime HBeginDateCol { get; set; } WebAPI/WebAPI.csproj
@@ -464,6 +464,7 @@ <Compile Include="Controllers\ä»å管ç\æ¡ç åºå ¥åºè®°å½\Kf_ICStockInOutBillController.cs" /> <Compile Include="Controllers\ä»å管ç\æ¡ç åºå\KF_ICInventoryList_WMSBillController.cs" /> <Compile Include="Controllers\ä»å管ç\æ¡ç çæ\Gy_BarCodeBill_OutController.cs" /> <Compile Include="Controllers\ä»å管ç\æ¡ç çæ\Gy_SplitBarCodeController.cs" /> <Compile Include="Controllers\ä»å管ç\æ¡ç çæ\KF_BarCodeStatusChangeBillController.cs" /> <Compile Include="Controllers\ä»å管ç\æ¡ç çæ\Sc_BarCodeController.cs" /> <Compile Include="Controllers\ä»å管ç\è°æ¨çç¹\Kf_MoveStockRequestBillController.cs" /> @@ -946,6 +947,7 @@ <Folder Include="Views\Gy_RoutingGroup\" /> <Folder Include="Views\Gy_SettleStyle\" /> <Folder Include="Views\Gy_SOPBill\" /> <Folder Include="Views\Gy_SplitBarCode\" /> <Folder Include="Views\Gy_Staff\" /> <Folder Include="Views\Gy_StdMinPickQty\" /> <Folder Include="Views\Gy_StockPlace_\" /> WorkM/WorkM.csproj
@@ -227,6 +227,12 @@ <Compile Include="æ¥è¡¨åæ\Sc_WareHouseReport.Designer.cs"> <DependentUpon>Sc_WareHouseReport.cs</DependentUpon> </Compile> <Compile Include="æ¥è¡¨åæ\Sc_OverProdReport.cs"> <SubType>Form</SubType> </Compile> <Compile Include="æ¥è¡¨åæ\Sc_OverProdReport.Designer.cs"> <DependentUpon>Sc_OverProdReport.cs</DependentUpon> </Compile> <Compile Include="æ¥è¡¨åæ\Sc_WorkShopReport.cs"> <SubType>Form</SubType> </Compile> @@ -986,6 +992,9 @@ <EmbeddedResource Include="æ¥è¡¨åæ\Sc_WareHouseReport.resx"> <DependentUpon>Sc_WareHouseReport.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="æ¥è¡¨åæ\Sc_OverProdReport.resx"> <DependentUpon>Sc_OverProdReport.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="æ¥è¡¨åæ\Sc_WorkShopReport.resx"> <DependentUpon>Sc_WorkShopReport.cs</DependentUpon> </EmbeddedResource> WorkM/±¨±í·ÖÎö/Sc_OverProdReport.Designer.cs
New file @@ -0,0 +1,532 @@ namespace WorkM { partial class Sc_OverProdReport { /// <summary> /// å¿ éç设计å¨åéã /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// æ¸ çæææ£å¨ä½¿ç¨çèµæºã /// </summary> /// <param name="disposing">妿åºéæ¾æç®¡èµæºï¼ä¸º trueï¼å¦å为 falseã</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows çªä½è®¾è®¡å¨çæç代ç /// <summary> /// è®¾è®¡å¨æ¯ææéçæ¹æ³ - ä¸è¦ /// 使ç¨ä»£ç ç¼è¾å¨ä¿®æ¹æ¤æ¹æ³çå 容ã /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Sc_ProcExchListReport)); this.timer1 = new System.Windows.Forms.Timer(this.components); this.Tool = new System.Windows.Forms.ToolStrip(); this.yl = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.dy = new System.Windows.Forms.ToolStripButton(); this.view = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.cx = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.tc = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.mrlk = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); this.bclk = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.pPic = new System.Windows.Forms.Panel(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); //this.cmdHEDeptID = new System.Windows.Forms.Button(); //this.cmdHBDeptID = new System.Windows.Forms.Button(); //this.label6 = new System.Windows.Forms.Label(); //this.txtHEDeptID = new System.Windows.Forms.TextBox(); //this.txtHBDeptID = new System.Windows.Forms.TextBox(); //this.label1 = new System.Windows.Forms.Label(); //this.dtpHEDate = new System.Windows.Forms.DateTimePicker(); //this.label3 = new System.Windows.Forms.Label(); //this.dtpHBDate = new System.Windows.Forms.DateTimePicker(); //this.label4 = new System.Windows.Forms.Label(); this.lblCaption = new System.Windows.Forms.Label(); this.timer2 = new System.Windows.Forms.Timer(this.components); this.grdMain = new System.Windows.Forms.DataGridView(); this.grdSum = new System.Windows.Forms.DataGridView(); this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); this.eXCELToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cSVToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.Tool.SuspendLayout(); this.pPic.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.grdSum)).BeginInit(); this.SuspendLayout(); // // timer1 // this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // Tool // this.Tool.AutoSize = false; this.Tool.BackColor = System.Drawing.SystemColors.Control; this.Tool.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("Tool.BackgroundImage"))); this.Tool.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.Tool.ImageScalingSize = new System.Drawing.Size(22, 22); this.Tool.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripDropDownButton1, this.yl, this.toolStripSeparator4, this.dy, this.view, this.toolStripSeparator2, this.cx, this.toolStripSeparator1, this.tc, this.toolStripSeparator3, this.toolStripSeparator8, this.mrlk, this.toolStripSeparator7, this.bclk, this.toolStripSeparator9}); this.Tool.Location = new System.Drawing.Point(0, 0); this.Tool.Name = "Tool"; this.Tool.Padding = new System.Windows.Forms.Padding(0); this.Tool.Size = new System.Drawing.Size(1257, 59); this.Tool.Stretch = true; this.Tool.TabIndex = 16; this.Tool.Text = "toolStrip1"; // // yl // this.yl.AutoSize = false; this.yl.Image = ((System.Drawing.Image)(resources.GetObject("yl.Image"))); this.yl.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.yl.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.yl.ImageTransparentColor = System.Drawing.Color.Magenta; this.yl.Name = "yl"; this.yl.Size = new System.Drawing.Size(35, 42); this.yl.Text = "å¼åº"; this.yl.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.yl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.yl.Visible = false; this.yl.Click += new System.EventHandler(this.yc_Click); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Size = new System.Drawing.Size(6, 59); this.toolStripSeparator4.Visible = false; // // dy // this.dy.AutoSize = false; this.dy.Image = ((System.Drawing.Image)(resources.GetObject("dy.Image"))); this.dy.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.dy.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.dy.ImageTransparentColor = System.Drawing.Color.Magenta; this.dy.Name = "dy"; this.dy.Size = new System.Drawing.Size(35, 42); this.dy.Text = "æå°"; this.dy.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.dy.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.dy.Visible = false; this.dy.Click += new System.EventHandler(this.dy_Click); // // view // this.view.AutoSize = false; this.view.Image = ((System.Drawing.Image)(resources.GetObject("view.Image"))); this.view.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.view.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.view.ImageTransparentColor = System.Drawing.Color.Magenta; this.view.Name = "view"; this.view.Size = new System.Drawing.Size(35, 42); this.view.Text = "é¢è§"; this.view.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.view.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.view.Visible = false; this.view.Click += new System.EventHandler(this.view_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(6, 59); // // cx // this.cx.AutoSize = false; this.cx.Image = ((System.Drawing.Image)(resources.GetObject("cx.Image"))); this.cx.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.cx.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.cx.ImageTransparentColor = System.Drawing.Color.White; this.cx.Name = "cx"; this.cx.Size = new System.Drawing.Size(35, 42); this.cx.Text = "æ¥è¯¢"; this.cx.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.cx.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.cx.Click += new System.EventHandler(this.cx_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(6, 59); // // tc // this.tc.AutoSize = false; this.tc.Image = ((System.Drawing.Image)(resources.GetObject("tc.Image"))); this.tc.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.tc.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.tc.ImageTransparentColor = System.Drawing.Color.White; this.tc.Name = "tc"; this.tc.Size = new System.Drawing.Size(35, 42); this.tc.Text = "éåº"; this.tc.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.tc.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.tc.Click += new System.EventHandler(this.tc_Click); // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new System.Drawing.Size(6, 59); // // toolStripSeparator8 // this.toolStripSeparator8.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.Size = new System.Drawing.Size(6, 59); // // mrlk // this.mrlk.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.mrlk.Image = ((System.Drawing.Image)(resources.GetObject("mrlk.Image"))); this.mrlk.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.mrlk.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.mrlk.ImageTransparentColor = System.Drawing.Color.White; this.mrlk.Name = "mrlk"; this.mrlk.Size = new System.Drawing.Size(73, 56); this.mrlk.Text = "é»è®¤å宽"; this.mrlk.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.mrlk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.mrlk.Click += new System.EventHandler(this.mrlk_Click); // // toolStripSeparator7 // this.toolStripSeparator7.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Size = new System.Drawing.Size(6, 59); // // bclk // this.bclk.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.bclk.Image = ((System.Drawing.Image)(resources.GetObject("bclk.Image"))); this.bclk.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.bclk.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.bclk.ImageTransparentColor = System.Drawing.Color.White; this.bclk.Name = "bclk"; this.bclk.Size = new System.Drawing.Size(73, 56); this.bclk.Text = "ä¿åå宽"; this.bclk.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.bclk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.bclk.Click += new System.EventHandler(this.bclk_Click); // // toolStripSeparator9 // this.toolStripSeparator9.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Size = new System.Drawing.Size(6, 59); // // pPic // this.pPic.BackColor = System.Drawing.Color.White; this.pPic.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pPic.BackgroundImage"))); this.pPic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.pPic.Controls.Add(this.dataGridView1); //this.pPic.Controls.Add(this.cmdHEDeptID); //this.pPic.Controls.Add(this.cmdHBDeptID); //this.pPic.Controls.Add(this.label6); //this.pPic.Controls.Add(this.txtHEDeptID); //this.pPic.Controls.Add(this.txtHBDeptID); //this.pPic.Controls.Add(this.label1); //this.pPic.Controls.Add(this.dtpHEDate); //this.pPic.Controls.Add(this.label3); //this.pPic.Controls.Add(this.dtpHBDate); //this.pPic.Controls.Add(this.label4); this.pPic.Controls.Add(this.lblCaption); this.pPic.Dock = System.Windows.Forms.DockStyle.Top; this.pPic.Location = new System.Drawing.Point(0, 59); this.pPic.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.pPic.Name = "pPic"; this.pPic.Size = new System.Drawing.Size(1257, 69); this.pPic.TabIndex = 17; // // dataGridView1 // this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Location = new System.Drawing.Point(1217, 6); this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.Size = new System.Drawing.Size(36, 19); this.dataGridView1.TabIndex = 68; this.dataGridView1.Visible = false; //// //// cmdHEDeptID //// //this.cmdHEDeptID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHEDeptID.Image"))); //this.cmdHEDeptID.ImageAlign = System.Drawing.ContentAlignment.TopRight; //this.cmdHEDeptID.Location = new System.Drawing.Point(733, 32); //this.cmdHEDeptID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); //this.cmdHEDeptID.Name = "cmdHEDeptID"; //this.cmdHEDeptID.Size = new System.Drawing.Size(29, 28); //this.cmdHEDeptID.TabIndex = 67; //this.cmdHEDeptID.UseVisualStyleBackColor = true; //this.cmdHEDeptID.Click += new System.EventHandler(this.cmdHEDeptID_Click); //// //// cmdHBDeptID //// //this.cmdHBDeptID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHBDeptID.Image"))); //this.cmdHBDeptID.ImageAlign = System.Drawing.ContentAlignment.TopRight; //this.cmdHBDeptID.Location = new System.Drawing.Point(733, 4); //this.cmdHBDeptID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); //this.cmdHBDeptID.Name = "cmdHBDeptID"; //this.cmdHBDeptID.Size = new System.Drawing.Size(29, 28); //this.cmdHBDeptID.TabIndex = 66; //this.cmdHBDeptID.UseVisualStyleBackColor = true; //this.cmdHBDeptID.Click += new System.EventHandler(this.cmdHBDeptID_Click); //// //// label6 //// //this.label6.AutoSize = true; //this.label6.BackColor = System.Drawing.Color.Transparent; //this.label6.Location = new System.Drawing.Point(543, 39); //this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); //this.label6.Name = "label6"; //this.label6.Size = new System.Drawing.Size(22, 15); //this.label6.TabIndex = 65; //this.label6.Text = "è³"; //// //// txtHEDeptID //// //this.txtHEDeptID.Location = new System.Drawing.Point(579, 34); //this.txtHEDeptID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); //this.txtHEDeptID.Name = "txtHEDeptID"; //this.txtHEDeptID.Size = new System.Drawing.Size(160, 25); //this.txtHEDeptID.TabIndex = 64; //// //// txtHBDeptID //// //this.txtHBDeptID.Location = new System.Drawing.Point(579, 5); //this.txtHBDeptID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); //this.txtHBDeptID.Name = "txtHBDeptID"; //this.txtHBDeptID.Size = new System.Drawing.Size(160, 25); //this.txtHBDeptID.TabIndex = 63; //// //// label1 //// //this.label1.AutoSize = true; //this.label1.BackColor = System.Drawing.Color.Transparent; //this.label1.Location = new System.Drawing.Point(512, 10); //this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); //this.label1.Name = "label1"; //this.label1.Size = new System.Drawing.Size(61, 15); //this.label1.TabIndex = 62; //this.label1.Text = "é¨ é¨"; //// //// dtpHEDate //// //this.dtpHEDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; //this.dtpHEDate.Location = new System.Drawing.Point(352, 35); //this.dtpHEDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); //this.dtpHEDate.Name = "dtpHEDate"; //this.dtpHEDate.Size = new System.Drawing.Size(147, 25); //this.dtpHEDate.TabIndex = 61; //// //// label3 //// //this.label3.AutoSize = true; //this.label3.BackColor = System.Drawing.Color.Transparent; //this.label3.Location = new System.Drawing.Point(276, 39); //this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); //this.label3.Name = "label3"; //this.label3.Size = new System.Drawing.Size(67, 15); //this.label3.TabIndex = 60; //this.label3.Text = "ç»ææ¥æ"; //// //// dtpHBDate //// //this.dtpHBDate.Format = System.Windows.Forms.DateTimePickerFormat.Short; //this.dtpHBDate.Location = new System.Drawing.Point(352, 6); //this.dtpHBDate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); //this.dtpHBDate.Name = "dtpHBDate"; //this.dtpHBDate.Size = new System.Drawing.Size(147, 25); //this.dtpHBDate.TabIndex = 59; //// //// label4 //// //this.label4.AutoSize = true; //this.label4.BackColor = System.Drawing.Color.Transparent; //this.label4.Location = new System.Drawing.Point(276, 10); //this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); //this.label4.Name = "label4"; //this.label4.Size = new System.Drawing.Size(67, 15); //this.label4.TabIndex = 58; //this.label4.Text = "å¼å§æ¥æ"; // // lblCaption // this.lblCaption.AutoSize = true; this.lblCaption.BackColor = System.Drawing.Color.Transparent; this.lblCaption.Cursor = System.Windows.Forms.Cursors.No; this.lblCaption.Font = new System.Drawing.Font("å®ä½", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblCaption.Location = new System.Drawing.Point(16, 20); this.lblCaption.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblCaption.Name = "lblCaption"; this.lblCaption.Size = new System.Drawing.Size(179, 24); this.lblCaption.TabIndex = 4; this.lblCaption.Text = "ReportTemplet"; // // timer2 // this.timer2.Tick += new System.EventHandler(this.timer2_Tick); // // grdMain // this.grdMain.AllowUserToAddRows = false; this.grdMain.AllowUserToDeleteRows = false; this.grdMain.BackgroundColor = System.Drawing.Color.White; this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.grdMain.Dock = System.Windows.Forms.DockStyle.Fill; this.grdMain.Location = new System.Drawing.Point(0, 128); this.grdMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.grdMain.Name = "grdMain"; this.grdMain.ReadOnly = true; this.grdMain.RowTemplate.Height = 23; this.grdMain.Size = new System.Drawing.Size(1257, 414); this.grdMain.TabIndex = 54; this.grdMain.CellMouseUp += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.grdMain_CellMouseUp); this.grdMain.Paint += new System.Windows.Forms.PaintEventHandler(this.grdMain_Paint); this.grdMain.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.grdMain_ColumnWidthChanged); // // grdSum // this.grdSum.AllowUserToAddRows = false; this.grdSum.AllowUserToDeleteRows = false; this.grdSum.BackgroundColor = System.Drawing.SystemColors.Control; this.grdSum.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.grdSum.Dock = System.Windows.Forms.DockStyle.Bottom; this.grdSum.Location = new System.Drawing.Point(0, 542); this.grdSum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.grdSum.Name = "grdSum"; this.grdSum.ReadOnly = true; this.grdSum.RowTemplate.Height = 23; this.grdSum.ScrollBars = System.Windows.Forms.ScrollBars.None; this.grdSum.Size = new System.Drawing.Size(1257, 24); this.grdSum.TabIndex = 55; // // toolStripDropDownButton1 // this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.eXCELToolStripMenuItem, this.cSVToolStripMenuItem}); this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.toolStripDropDownButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; this.toolStripDropDownButton1.Size = new System.Drawing.Size(52, 56); this.toolStripDropDownButton1.Text = "å¼åº"; this.toolStripDropDownButton1.TextAlign = System.Drawing.ContentAlignment.BottomCenter; this.toolStripDropDownButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; // // eXCELToolStripMenuItem // this.eXCELToolStripMenuItem.Name = "eXCELToolStripMenuItem"; this.eXCELToolStripMenuItem.Size = new System.Drawing.Size(152, 24); this.eXCELToolStripMenuItem.Text = "EXCEL"; this.eXCELToolStripMenuItem.Click += new System.EventHandler(this.eXCELToolStripMenuItem_Click); // // cSVToolStripMenuItem // this.cSVToolStripMenuItem.Name = "cSVToolStripMenuItem"; this.cSVToolStripMenuItem.Size = new System.Drawing.Size(152, 24); this.cSVToolStripMenuItem.Text = "CSV"; this.cSVToolStripMenuItem.Click += new System.EventHandler(this.cSVToolStripMenuItem_Click); // // Sc_ProcExchListReport // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1257, 566); this.Controls.Add(this.grdMain); this.Controls.Add(this.grdSum); this.Controls.Add(this.pPic); this.Controls.Add(this.Tool); this.KeyPreview = true; this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Name = "Sc_ProcExchListReport"; this.Text = "ReportTemplet"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.Frm_EasyReport_Load); this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Sc_ProcExchListReport_KeyUp); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Sc_ProcExchListReport_KeyDown); this.Tool.ResumeLayout(false); this.Tool.PerformLayout(); this.pPic.ResumeLayout(false); this.pPic.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.grdMain)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.grdSum)).EndInit(); this.ResumeLayout(false); } #endregion public System.Windows.Forms.Timer timer1; private System.Windows.Forms.ToolStrip Tool; private System.Windows.Forms.ToolStripButton yl; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripButton dy; private System.Windows.Forms.ToolStripButton view; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripButton cx; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripButton tc; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripButton mrlk; private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; private System.Windows.Forms.ToolStripButton bclk; private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; private System.Windows.Forms.Panel pPic; private System.Windows.Forms.Label lblCaption; private System.Windows.Forms.DateTimePicker dtpHEDate; private System.Windows.Forms.Label label3; private System.Windows.Forms.DateTimePicker dtpHBDate; private System.Windows.Forms.Label label4; private System.Windows.Forms.Timer timer2; private System.Windows.Forms.DataGridView grdMain; private System.Windows.Forms.DataGridView grdSum; private System.Windows.Forms.Button cmdHEDeptID; private System.Windows.Forms.Button cmdHBDeptID; private System.Windows.Forms.Label label6; public System.Windows.Forms.TextBox txtHEDeptID; public System.Windows.Forms.TextBox txtHBDeptID; private System.Windows.Forms.Label label1; private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; private System.Windows.Forms.ToolStripMenuItem eXCELToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem cSVToolStripMenuItem; } } WorkM/±¨±í·ÖÎö/Sc_OverProdReport.cs
New file @@ -0,0 +1,342 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using gregn6Lib; using DBUtility; using SQLHelper; namespace WorkM { public partial class Sc_OverProdReport : Form { public Sc_OverProdReport() { InitializeComponent(); } public string ModName = ""; public string ModCaption = "è¶ äº§æ¥è¡¨"; Pub_Class.ClsGridListSum oSumGrid = new Pub_Class.ClsGridListSum(); #region åºå®ä»£ç private void initGrid() { DBUtility.Xt_BaseBillFun.initGridRpt(grdMain, this.Name); } //å¾å°å¯¹åºå private Int32 Fun_GetCol(string sCol) { return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain); } private void tc_Click(object sender, EventArgs e) { this.Close(); } private void TotalAll() { if (grdMain.Rows.Count > 0 && grdMain.ColumnCount > 0) { oSumGrid.SetGridsum(); oSumGrid.TotalAll(); } } //Sc_ProcExchListReportDlg oDlg = new Sc_ProcExchListReportDlg(); private void cx_Click(object sender, EventArgs e) { //oDlg.ShowDialog(); //if (oDlg.IsOk == 1) //{ timer1.Enabled = true; //} } //设置æ¥è¡¨åç§° private void SetFormCaption() { this.Text = ModCaption; lblCaption.Text = this.Text; initGrid();//ç½æ ¼æ é¢åå§å initHeadCaption();//表头åå§å } private void Frm_EasyReport_Load(object sender, EventArgs e) { SetFormCaption(); oSumGrid.ogrdMain = grdMain; //åå§å new oSumGrid.oGridsum = grdSum; } private void timer1_Tick(object sender, EventArgs e) { timer1.Enabled = false; if (Fun_AllowQuery()) { initGrid(); Xt_Wait oFrm = new Xt_Wait(); oFrm.Show(); System.Windows.Forms.Application.DoEvents(); Display(); System.Windows.Forms.Application.DoEvents(); oFrm.Close(); oFrm.Dispose(); } } private void Sc_ProcExchListReport_KeyUp(object sender, KeyEventArgs e) { if (e.KeyValue == 13) timer1.Enabled = true; } private void mrlk_Click(object sender, EventArgs e) { DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name); } private void bclk_Click(object sender, EventArgs e) { //ä¿åå宽 DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name); } //æå° private void dy_Click(object sender, EventArgs e) { Sub_SetReport(); Report.Print(true); } //é¢è§ private void view_Click(object sender, EventArgs e) { Sub_SetReport(); Report.PrintPreview(true); } #endregion #region çé¢å¤ç //åå§å表头æ¾ç¤º private void initHeadCaption() { //dtpHBDate.Value = DateTime.Today; //dtpHEDate.Value = DateTime.Today; } private bool Fun_AllowQuery()//å®¡æ ¸æ¥è¯¢æ¡ä»¶ { //if (txtHBDeptID.Text.Trim().Length == 0) //{ // MessageBox.Show(this, "è¯·éæ©å¼å§é¨é¨ï¼", "æç¤º"); // return false; //} return true; } private void Display() { ClsCN SubCn = new ClsCN(); DataSet DSet; DataSet DsHead; DataSet DsQty; int BCol = 7; long HDeptID = 0; long HMaterID = 0; long HEmpID = 0; long HProcID = 0; //æ¾ç¤ºæ¥è¡¨å¤´ æ é¢ //忢GRIDå·æ° å å¿«é度 //è¿æ»¤æ¡ä»¶Dlg //string sDlgWhere = ""; //sDlgWhere = sDlgWhere + ",'" + txtHBDeptID.Text.Trim() + "'"; //if (sDlgWhere.Trim().Length > 0) //{ // sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1); //} // DSet = SubCn.RunProcReturn("exec h_p_CCBB " , "Gy_Czygl"); //çæé¦è¡æ é¢ if (DSet == null) { MessageBox.Show("没æè¿åä»»ä½ç»æ,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); return; } // grdMain.DataSource = DSet.Tables[0].DefaultView; //è·å卿å ï¼ç©æä¿¡æ¯ï¼ //DsHead = SubCn.RunProcReturn("exec h_p_Sc_GetProcExchReportHead " + sDlgWhere, "Gy_Czygl"); //for (int a = 0; a < DsHead.Tables[0].Rows.Count; a++) //{ // if (ClsPub.isLong(DsHead.Tables[0].Rows[a]["HMaterID"]) != 0) // { // grdMain.Columns.Add(ClsPub.isStrNull(DsHead.Tables[0].Rows[a]["HMaterID"]), ClsPub.isStrNull(DsHead.Tables[0].Rows[a]["HName"])); // grdMain.Columns[BCol].Tag = ClsPub.isLong(DsHead.Tables[0].Rows[a]["HMaterID"]); // BCol = BCol + 1; // } //} BCol = 7; //è·å卿å 容 ï¼æ°éä¿¡æ¯ï¼ for (int row = 0; row <= grdMain.RowCount - 1; row++) { for (int col = BCol; col <= grdMain.ColumnCount - 1; col++) { //HDeptID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HDeptID")].Value); //HMaterID = DBUtility.ClsPub.isLong(grdMain.Columns[col].Tag); //HEmpID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HEmpID")].Value); //HProcID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HProcID")].Value); DsQty = SubCn.RunProcReturn("exec h_p_CCBB", "Gy_Czygl"); if (DsQty != null && DsQty.Tables[0].Rows.Count > 0) { //grdMain.Rows[row].Cells[col].Value = DBUtility.ClsPub.isDoule(DsQty.Tables[0].Rows[0]["HQty"], 2); } } } //设置å计å string sTotalCol = ""; sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet); string[] sT; sT = sTotalCol.Split(Convert.ToChar(",")); oSumGrid.BuildTotalCols(sT); // DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, "æ¯", 0); // DBUtility.Xt_BaseBillFun.GetGrid(grdMain, this.Name); Total(); } #endregion #region æå°è®¾ç½® //æå°è®¾ç½® GridppReport Report; //设置æå°æ¨¡çè·¯å¾ private void Sub_SetReport() { Report = new GridppReport(); Report.LoadFromFile(ClsPub.AppPath + @"\Report\åºæ¶æ¬¾æç»è¡¨.grf"); //here . Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord); Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable); } //å¡«å ¥åæ®è¡¨å¤´ä¿¡æ¯ private void ReportBeforePostRecord()//your report?kao { //Report.FieldByName("HDateItemID").AsString = lblHDateItemID.Text; //Report.FieldByName("CusNumber").AsString = lblHCusNumber.Text; //Report.FieldByName("CusName").AsString = lblHCusName.Text; //Report.FieldByName("BeginBalance").AsString = lblHBeginBalance.Text; } //å¡«å ¥åæ®æç»ä¿¡æ¯ private void ReportFetchRecordByDataTable() { //Utility.FillRecordToReport(Report, grdMain, false); } #endregion #region æ°æ®å¯¼åº private void yc_Click(object sender, EventArgs e) { //DBUtility.Gy_BaseFun.DataToExcel(this.Text, grdMain); //DBUtility.Gy_BaseFun.Data2Excel(this.Text, grdMain, this.Name); DBUtility.Gy_BaseFun.DataToExcel(this.Text, grdMain); } #endregion private void timer2_Tick(object sender, EventArgs e) { timer2.Enabled = false; //oDlg.ShowDialog(); //if (oDlg.IsOk == 1) //{ timer1.Enabled = true; //} } private void Total() { if (grdMain.Rows.Count > 0 && grdMain.ColumnCount > 0) { oSumGrid.SetGridsum(); oSumGrid.Total(); } } private void grdMain_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) { Total(); } private void grdMain_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e) { Total(); } private void grdMain_Paint(object sender, PaintEventArgs e) { DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain); } private void cmdHBDeptID_Click(object sender, EventArgs e) { BLL.ClsBaseSelect.SetTextByDept(txtHBDeptID, true); if (txtHEDeptID.Text.Trim() == "") { txtHEDeptID.Text = txtHBDeptID.Text; } } private void cmdHEDeptID_Click(object sender, EventArgs e) { BLL.ClsBaseSelect.SetTextByDept(txtHEDeptID, true); } private void yc_Click_1(object sender, EventArgs e) { BLL.Gy_GridView_Hide oHide = new BLL.Gy_GridView_Hide(); oHide.KeyItem = this.Name; oHide.oGrd = grdMain; oHide.ShowDialog(); // DBUtility.ClsPub.HideGridView(grdMain, Name, DBUtility.ClsPub.AppPath);//设置éèå } private void Sc_ProcExchListReport_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F7) { TotalAll(); } } private void eXCELToolStripMenuItem_Click(object sender, EventArgs e) { //DBUtility.Gy_BaseFun.Data2Excel(this.Text, grdMain, this.Name); DBUtility.Gy_BaseFun.DataToExcel(this.Text, grdMain); } private void cSVToolStripMenuItem_Click(object sender, EventArgs e) { DBUtility.Gy_BaseFun.DataGridViewToExcel2(grdMain, this.Text, this.Text); } } } WorkM/±¨±í·ÖÎö/Sc_OverProdReport.resx
New file @@ -0,0 +1,129 @@ <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> <metadata name="Tool.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>122, 17</value> </metadata> <metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>211, 17</value> </metadata> </root> WorkM/±¨±í·ÖÎö/Sc_WareHouseReport.cs
@@ -20,7 +20,7 @@ } public string ModName = ""; public string ModCaption = "è¶ äº§æ¥è¡¨"; public string ModCaption = "ä»åºæ¥è¡¨"; Pub_Class.ClsGridListSum oSumGrid = new Pub_Class.ClsGridListSum(); @@ -167,7 +167,7 @@ // sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1); //} // DSet = SubCn.RunProcReturn("exec h_p_CCBB " , "Gy_Czygl"); DSet = SubCn.RunProcReturn("exec h_p_CKBB", "h_p_CKBB"); //çæé¦è¡æ é¢ if (DSet == null) { @@ -199,10 +199,10 @@ //HMaterID = DBUtility.ClsPub.isLong(grdMain.Columns[col].Tag); //HEmpID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HEmpID")].Value); //HProcID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HProcID")].Value); DsQty = SubCn.RunProcReturn("exec h_p_CCBB", "Gy_Czygl"); DsQty = SubCn.RunProcReturn("exec h_p_CKBB", "h_p_CKBB"); if (DsQty != null && DsQty.Tables[0].Rows.Count > 0) { grdMain.Rows[row].Cells[col].Value = DBUtility.ClsPub.isDoule(DsQty.Tables[0].Rows[0]["HQty"], 2); //grdMain.Rows[row].Cells[col].Value = DBUtility.ClsPub.isDoule(DsQty.Tables[0].Rows[0]["HQty"], 2); } } }