private void Weight_BC_Load(object sender, EventArgs e) { b.ob = this.ob; //if (CustomInfo.Equals("JQ01")) //{ // strStoreCode = "SH000301"; // m_DefaultSender = "卷取秤1#"; //} //if (CustomInfo.Equals("JQ02")) //{ // strStoreCode = "SH000302"; // m_DefaultSender = "卷取秤2#"; //} //else if (CustomInfo.Equals("DSH")) //{ // strStoreCode = "SH000303"; // m_DefaultSender = "地上衡"; //} stRunPath = System.Environment.CurrentDirectory; if (Constant.RunPath == "") { Constant.RunPath = System.Environment.CurrentDirectory; } //查询计量点信息,并启动所有查得的计量点的后台采集工作,和汽车衡不一样的是不需要管理员分配,直接接管 QueryJLDData(); //初始化计量点 //WeighPoint wp = new WeighPoint(this.ob); string pointCode = ""; //if (CustomInfo.Equals("JQ01")) //{ // pointCode = "K23"; //} //if (CustomInfo.Equals("JQ02")) //{ // pointCode = "K24"; //} //else if(CustomInfo.Equals("DSH")) //{ // pointCode = "K25"; //} WeighPoint wp = new WeighPoint(this.ob); m_Points = wp.GetPoints("ZKD"); 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()); this.cbWLMC.Text = "中宽带成品";//物料名称 this.cbFHDW.Text = "中宽带厂";//发货单位 this.cbSHDW.Text = "生产订单收货";//收货单位 //初始化标准管理对象 _weightStdManage = new WeightStdManage(this.ob); _depotManage = new DepotManage(); }
//窗体初始化 private void BoardBilletWeight_Load(object sender, EventArgs e) { //if (CustomInfo.Equals("GD1")) //{ // ultraOptionSet1.Items.RemoveAt(1); // ultraOptionSet1.Items[0].DisplayText = "棒材"; //} //else if (CustomInfo.Equals("GD2")) //{ // ultraOptionSet1.Items.RemoveAt(0); //} baseinfo.ob = this.ob; b.ob = this.ob; m_BaseInfo = new BaseInfo(); m_BaseInfo.ob = this.ob; this.chkAutoSave.Enabled = true; if (Constant.RunPath == "") { Constant.RunPath = System.Environment.CurrentDirectory; } ClearControler();//清空控件 this.txtJLD.Text = ""; this.txtJLY.Text = ""; this.txtBC.Text = ""; this.txtBB.Text = ""; this.txtZL.Text = ""; pointcode = "K19"; //初始化计量点 WeighPoint wp = new WeighPoint(this.ob); m_Points = wp.GetPoints("BP") ; if (m_Points != null) { m_nPointCount = m_Points.Length; } dt = new DataTable(); txtJLY.Text = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName(); this.txtBC.Text = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()); this.txtBB.Text = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup()); p_shiftdate = System.DateTime.Today.Date.ToShortDateString(); strRunPath = System.Environment.CurrentDirectory;//当前自定义路径 GetYYBBData(); QueryAndBindJLDData();//绑定计量点GRID m_List.KeyPress += new KeyPressEventHandler(m_List_KeyPress); InitConfig(); this.BuildMyTable();//构建内存表格式 this.DownLoadMaterial(); //下载磅房对应物料信息到内存表 this.DownLoadReceiver(); //下载磅房对应收货单位信息到内存表 this.DownLoadSender(); //下载磅房对应发货单位信息到内存表 this.DownLoadSteelType(); //下载磅房对应承运单位信息到内存表 this.DownLoadSepc(); //下载磅房对应车号信息到内存表 this.DownLoadFlow(); //下载流向信息 this.btnDS.Enabled = false; this.btnBC.Enabled = true; this.txtLH.Focus(); }