private void Weight_BC_Load(object sender, EventArgs e) { b.ob = this.ob; if (CustomInfo.Equals("BC01")) { strStoreCode = "SH000098"; m_DefaultSender = "棒材厂A区"; } else if (CustomInfo.Equals("BC02")) { strStoreCode = "SH000099"; m_DefaultSender = "棒材厂B区"; } stRunPath = System.Environment.CurrentDirectory; if (Constant.RunPath == "") { Constant.RunPath = System.Environment.CurrentDirectory; } //查询计量点信息,并启动所有查得的计量点的后台采集工作,和汽车衡不一样的是不需要管理员分配,直接接管 QueryJLDData(); //初始化计量点 WeighPoint wp = new WeighPoint(this.ob); string pointCode = ""; if (CustomInfo.Equals("BC01")) { pointCode = "K17"; } else if(CustomInfo.Equals("BC02")) { pointCode = "K18"; } m_Points = new BT_POINT[]{wp.GetPoint(pointCode)}; if (m_Points != null) { m_nPointCount = m_Points.Length; } m_GetBaseInfo = new YGJZJL.PublicComponent.GetBaseInfo(); m_GetBaseInfo.ob = this.ob; InitConfig(); this.BuildMyTable();//构建内存表格式 this.DownLoadMaterial(); //下载磅房对应物料信息到内存表 this.DownLoadReceiver(); //下载磅房对应收货单位信息到内存表 this.DownLoadSender(); //下载磅房对应发货单位信息到内存表 this.DownLoadSteelType(); //下载磅房对应承运单位信息到内存表 this.DownLoadSepc(); //下载磅房对应车号信息到内存表 this.DownLoadFlow(); //下载流向信息 //获得登录用户信息并显示到控件 m_szCurUser = UserInfo.GetUserName();// CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName().ToString().Trim(); m_szCurBC = UserInfo.GetUserOrder(); //Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()); m_szCurBZ = UserInfo.GetUserGroup();// Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup()); txtJLY.Text = m_szCurUser; txtBC.Text = m_szCurBC; //控件初始化 ClearControl(); //控件事件和属性设置 ControlInit(); //获取语音信息 GetYYBBData(); //预报数据Grid初始化 PlanDataGridInit(); //创建计量数据表的结构 BuildWeightDataTable(); //m_hDataUpThread = new Thread(new System.Threading.ThreadStart(DoDataUp)); //m_hDataUpThread.Start(); m_hRunning = true; //复磅 this.tb_zzbh_fb.Enabled = false; this.tb_bandno_fb.Enabled = false; //手工录入 this.cbx_Hand.CheckState = CheckState.Unchecked; this.tbx_hWeight.Enabled = false; this.txtBC.Text = GetOrderGroupName(OperationInfo.order, UserInfo.GetUserOrder()); this.txtBZ.Text = GetOrderGroupName(OperationInfo.group, UserInfo.GetUserGroup()); //初始化标准管理对象 _weightStdManage = new WeightStdManage(this.ob); _depotManage = new DepotManage(); }
private void Weight_BC_Load(object sender, EventArgs e) { //隐藏视频 panel2.Width = 0; //隐藏计量点 groupBox7.Width = 0; b.ob = this.ob; switch(CustomInfo) { case "K26": case "K27": case "K32": strStoreCode = "SH000101"; m_preFlag = "TX"; m_DefaultSender = "制管直焊作业区"; m_DefaultReceiver = "小焊管成品库"; m_DefaultStandard = "GB/T13793-2008"; m_DefaultMeterial = "焊接钢管"; m_DefaultPM = "焊接钢管"; break; case "K33": case "K36": strStoreCode = "SH000102"; m_preFlag = "TL"; m_DefaultSender = "制管螺焊作业区"; m_DefaultReceiver = "大焊管成品库"; m_DefaultStandard = "GB/T3091-2008"; m_DefaultMeterial = "螺管"; m_DefaultPM = "螺管"; break; case "K34": case "K37": strStoreCode = "SH000102"; m_preFlag = "TZ"; m_DefaultSender = "制管直焊作业区"; m_DefaultReceiver = "大焊管成品库"; m_DefaultStandard = "GB/T13793-2008"; m_DefaultMeterial = "焊接钢管"; m_DefaultPM = "焊接钢管"; break; } bandSteelType(CustomInfo); bandPingMing(CustomInfo); bandGG(CustomInfo); bandLength(CustomInfo); bandPingMing(CustomInfo); bandStandard(CustomInfo); stRunPath = System.Environment.CurrentDirectory; if (Constant.RunPath == "") { Constant.RunPath = System.Environment.CurrentDirectory; } //查询计量点信息,并启动所有查得的计量点的后台采集工作,和汽车衡不一样的是不需要管理员分配,直接接管 QueryJLDData(); //初始化计量点 WeighPoint wp = new WeighPoint(this.ob); string pointCode = ""; pointCode = CustomInfo; m_Points = new BT_POINT[]{wp.GetPoint(pointCode)}; if (m_Points != null) { m_nPointCount = m_Points.Length; } m_GetBaseInfo = new YGJZJL.PublicComponent.GetBaseInfo(); m_GetBaseInfo.ob = this.ob; InitConfig(); this.BuildMyTable();//构建内存表格式 this.DownLoadMaterial(); //下载磅房对应物料信息到内存表 this.DownLoadReceiver(); //下载磅房对应收货单位信息到内存表 this.DownLoadSender(); //下载磅房对应发货单位信息到内存表 this.DownLoadSteelType(); //下载磅房对应承运单位信息到内存表 this.DownLoadSepc(); //下载磅房对应车号信息到内存表 this.DownLoadFlow(); //下载流向信息 //获得登录用户信息并显示到控件 m_szCurUser = UserInfo.GetUserName();// CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName().ToString().Trim(); m_szCurBC = UserInfo.GetUserOrder(); //Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()); m_szCurBZ = UserInfo.GetUserGroup();// Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup()); txtJLY.Text = m_szCurUser; txtBC.Text = m_szCurBC; //控件初始化 ClearControl(); //控件事件和属性设置 ControlInit(); //获取语音信息 GetYYBBData(); //创建计量数据表的结构 BuildWeightDataTable(); m_hDataUpThread = new Thread(new System.Threading.ThreadStart(DoDataUp)); m_hDataUpThread.Start(); m_hRunning = true; //复磅 this.tb_zzbh_fb.Enabled = false; this.tb_bandno_fb.Enabled = false; //手工录入 this.cbx_Hand.CheckState = CheckState.Unchecked; this.tbx_hWeight.Enabled = false; this.txtBC.Text = GetOrderGroupName(OperationInfo.order, UserInfo.GetUserOrder()); this.txtBZ.Text = GetOrderGroupName(OperationInfo.group, UserInfo.GetUserGroup()); //初始化标准管理对象 _weightStdManage = new WeightStdManage(this.ob); //_depotManage = new DepotManage(); foreach (string printerName in PrinterSettings.InstalledPrinters) { cbPrint.Items.Add(printerName); } //打开计量点 ultraGrid2.Rows[0].Cells["XZ"].Value = true; ultraGrid2.Rows[0].Activated = true; ultraGrid2.UpdateData(); ultraGrid2_DoubleClickRow(ultraGrid2,new DoubleClickRowEventArgs(ultraGrid2.Rows[0],RowArea.Cell)); if (!CustomInfo.Equals("K33") && !CustomInfo.Equals("K36")) { label36.Visible = false; label37.Visible = false; txtThick.Visible = false; cbxRemark.Visible = false; } }