Example #1
0
 private void WeightRePrint_BC_Load(object sender, EventArgs e)
 {
     objBi = new BaseInfo(this.ob);
     BindComboData();
     BindLXType();
     //m_BaseInfo = new BaseInfo();
     //m_BaseInfo.ob = this.ob;
     //this.dtBeginTime.Value = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
     //m_szCurBC = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder());
     //m_szCurBZ = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup());
 }
Example #2
0
        private bool GetPictures(string strNo)
        {
            string err = "";
            //string strSql = "select t.fb_image1, t.fb_image2 from dt_storageweightimage t where t.fs_weightno = '" + strNo + "'";

            DataTable ds = new DataTable();
            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.statictrackweight.StaticWeight";
            ccp.MethodName = "queryImg";
            ccp.ServerParams = new object[] { strNo };

            ccp.SourceDataTable = ds;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            DataSet tp = CreateDataSet(ds);
            if (tp != null && tp.Tables.Count > 0 && tp.Tables[0].Rows.Count > 0)
            {
                DataTable table = tp.Tables[0];

                try
                {
                    byte[] Image1 = null;
                    byte[] Image2 = null;
                    byte[] Image3 = null;
                    byte[] Image4 = null;
                    Image1 = (byte[])table.Rows[0]["FB_IMAGE1"];
                    Image2 = (byte[])table.Rows[0]["FB_IMAGE2"];
                    Image3 = (byte[])table.Rows[0]["FB_IMAGE3"];
                    Image4 = (byte[])table.Rows[0]["FB_IMAGE4"];

                    BaseInfo GetImage = new BaseInfo();
                    GetImage.BitmapToImage(Image1, pictureBox1, pictureBox1.Width, pictureBox1.Height);
                    GetImage.BitmapToImage(Image2, pictureBox3, pictureBox3.Width, pictureBox3.Height);
                    GetImage.BitmapToImage(Image3, pictureBox4, pictureBox4.Width, pictureBox4.Height);
                    GetImage.BitmapToImage(Image4, pictureBox5, pictureBox5.Width, pictureBox5.Height);

                    return true;
                }
                catch (Exception ex)
                {
                    //MessageBox.Show("图片显示出错!\n" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    //return false;
                    return true;
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(err))
                {
                    //MessageBox.Show("查询出错!\n" + err, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    //return false;
                    return true;
                }

                try
                {
                    Image image1 = pictureBox1.Image;
                    Image image2 = pictureBox3.Image;
                    Image image3 = pictureBox4.Image;
                    Image image4 = pictureBox5.Image;

                    if (image1 != null)
                    {
                        image1.Dispose();
                    }

                    if (image2 != null)
                    {
                        image2.Dispose();
                    }
                    if (image3 != null)
                    {
                        image3.Dispose();
                    }
                    if (image4 != null)
                    {
                        image4.Dispose();
                    }
                }
                catch { }
                finally
                {
                    pictureBox1.Image = null;
                    pictureBox3.Image = null;
                    pictureBox4.Image = null;
                    pictureBox5.Image = null;
                }
                //MessageBox.Show("没有找到计量图片数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                //return false;
                return true;
            }
        }
Example #3
0
        private void UpdateFirstWeight_Load(object sender, EventArgs e)
        {
            objBi = new BaseInfo(this.ob);
            m_BaseInfo.ob = this.ob;
            m_BaseInfo.GetBFData(this.cbBF, "QC");
            m_BaseInfo.GetBFData(this.ultraComboEditor1, "QC");
            DownLoadFlow();
            InitConfig();
            this.BuildMyTable();//构建内存表格式
            this.DownLoadMaterial(); //下载磅房对应物料信息到内存表
            this.DownLoadReceiver();  //下载磅房对应收货单位信息到内存表
            this.DownLoadSender();  //下载磅房对应发货单位信息到内存表
            this.DownLoadTrans();  //下载磅房对应承运单位信息到内存表

            try
            {
                this.BeginTime.Value = DateTime.Today;
                this.EndTime.Value = DateTime.Today.AddDays(1).AddSeconds(-1);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
            //Query();
        }
Example #4
0
        private bool GetPictures(string strNo)
        {
            return false;
            string err = "";
            string strSql = "select t.fb_image1, t.fb_image2 from dt_storageweightimage t where t.fs_weightno = '" + strNo + "'";

            DataSet ds = SelectReturnDS("ygjzjl.bar.DBHelp", "getSqlInfo", new object[] { strSql }, out err);

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable table = ds.Tables[0];

                try
                {
                    byte[] Image1 = (byte[])table.Rows[0]["FB_IMAGE1"];
                    byte[] Image2 = (byte[])table.Rows[0]["FB_IMAGE2"];

                    BaseInfo GetImage = new BaseInfo();
                    GetImage.BitmapToImage(Image1, pictureBox1, pictureBox1.Width, pictureBox1.Height);
                    GetImage.BitmapToImage(Image2, pictureBox2, pictureBox2.Width, pictureBox2.Height);

                    return true;
                }
                catch (Exception ex)
                {
                    MessageBox.Show("ͼƬ��ʾ�����\n" + ex.Message, "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return false;
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(err))
                {
                    MessageBox.Show("��ѯ�����\n" + err, "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return false;
                }

                try
                {
                    Image image1 = pictureBox1.Image;
                    Image image2 = pictureBox2.Image;

                    if (image1 != null)
                    {
                        image1.Dispose();
                    }

                    if (image2 != null)
                    {
                        image2.Dispose();
                    }
                }
                catch { }
                finally
                {
                    pictureBox1.Image = null;
                    pictureBox2.Image = null;
                }
                MessageBox.Show("û���ҵ�����ͼƬ���ݣ�", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return false;
            }
        }
Example #5
0
 private void DataQuery_Load(object sender, EventArgs e)
 {
     objBi = new BaseInfo(this.ob);
 }
Example #6
0
        private void WeightPlan_BP_Load(object sender, EventArgs e)
        {
            tbPerson.Text = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            BaseInfo = new GetBaseInfo();
            m_BaseInfo = new BaseInfo();
            BaseInfo.ob = this.ob;
            m_BaseInfo.ob = this.ob;
            RefreshBaseInfo();
            dt = new DataTable();
            InitConfig();
            this.BuildMyTable();//构建内存表格式
            this.DownLoadSteelType();  //下载磅房对应钢种信息到内存表
            this.DownLoadSepc(); //下载磅房对应规格信息到内存表
            this.cbx_SteelSendType.SelectedIndex = 0;

            BandPointSteelType(PointID);
            BandPointSpec(PointID);
            //BindTransType();
            m_query = "2";
            m_insert_hxcf = "2";
            m_flag = true;
            m_thread = new Thread(new ThreadStart(QueryTread));
            m_thread.Start();
            m_hRunning = true;
            m_AutoRunning = false;
            //BindTranType();
            //BindTranType3();
            //BindLXTyep1();
            //BindLXTyep2();
            cbAnalysisTime.Checked = true;

            //timer1.Start();
            BindTranType();
            BindLXType();
            BindBilletReturn();
        }
Example #7
0
        private void WeightPlan_FPForBC_Load(object sender, EventArgs e)
        {
            tbPerson.Text = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            BaseInfo = new GetBaseInfo();
            m_BaseInfo = new BaseInfo();
            BaseInfo.ob = this.ob;
            m_BaseInfo.ob = this.ob;
            RefreshBaseInfo();
            dt = new DataTable();
            InitConfig();
            this.BuildMyTable();//构建内存表格式
            this.DownLoadSteelType();  //下载磅房对应钢种信息到内存表
            //this.DownLoadSepc(); //下载磅房对应规格信息到内存表
            this.cbx_SteelSendType.SelectedIndex = 0;

            BandPointSteelType(PointID);
            //BandPointSpec(PointID);
            //BindTransType();
            m_query = "2";
            m_insert_hxcf = "2";
            m_flag = true;
            m_thread = new Thread(new ThreadStart(QueryTread));
            m_thread.Start();
            m_hDataUpThread = new Thread(new System.Threading.ThreadStart(Auto_Get_Thread));
            m_hDataUpThread.Start();
            m_hRunning = true;
            m_AutoRunning = false;
            this.textBox1.Location = new System.Drawing.Point(-1, -27);
            //BindTranType();
            //BindTranType3();
            //BindLXTyep1();
            //BindLXTyep2();
            checkBox1.Checked = true;
            cbAnalysisTime.Checked = true;

            //timer1.Start();
            BindMaterial();
            BindTranType();
            BindLXType();
        }
Example #8
0
        private void MoltenInfo_One_Load(object sender, EventArgs e)
        {
            this.BilletInfo_GD_Fill_Panel.Controls.Add(picFDTP);

            PicInfo = new BaseInfo(this.ob);
            getbaseinfo = new GetBaseInfo(this.ob);
            objBi = new BaseInfo(this.ob);

            txtJly.Text = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();

            txtBc.Text = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()).ToString();//���
            strGroup = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup()); ; //����

            //PointID = "K12";
            stRunPath = System.Environment.CurrentDirectory;
            if (Constant.RunPath == "")
            {

                Constant.RunPath = System.Environment.CurrentDirectory;
            }

            QueryJLDData(); //��ѯ��������Ϣ
            OpenPound();//�򿪼�����

            RecordOpen(0);//���Ӽ�����Ӳ��¼���

            PointID = m_PoundRoomArray[0].POINTID;
            txtJld.Text = m_PoundRoomArray[0].POINTNAME;
            InitConfig();
            this.BuildMyTable();//�����ڴ���ʽ
            this.DownLoadMaterial(); //���ذ�����Ӧ������Ϣ���ڴ��
            this.DownLoadReceiver();  //���ذ�����Ӧ�ջ���λ��Ϣ���ڴ��
            this.DownLoadSender();  //���ذ�����Ӧ������λ��Ϣ���ڴ��
            this.DownLoadTrans();  //���ذ�����Ӧ���˵�λ��Ϣ���ڴ��
            this.DownLoadCarNo(); //���ذ�����Ӧ������Ϣ���ڴ��
            this.DownLoadFlow();//���ذ�����Ӧ������Ϣ���ڴ��
            //this.DownLoadLoadPoint();//���ذ�����Ӧװ������Ϣ���ڴ��
            //this.DownLoadUnLoadPoint();//���ذ�����Ӧж������Ϣ���ڴ��

            this.BandPointMaterial(PointID); //�󶨰�������
            this.BandPointReceiver(PointID); //�󶨰����ջ���λ
            this.BandPointSender(PointID); //�󶨰���������λ
            this.BandPointTrans(PointID); //�󶨰������˵�λ
            this.BandPointFlow(PointID);//��������Ϣ
            //GetLXData();//��������Ϣ

            this.cb_StoveSeatno.SelectedIndex = 0;
            this.cbFlow.SelectedIndex = 0;

            addSoundFile(PointID);
            queryHistoryDataByDate();
            queryFirstDataByAll();

            try
            {

                BeginPoundRoomThread();//��ִ����ʽ

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            btnDS.Enabled = false;
            btnBC.Enabled = false;
            bSglr = false;
        }
Example #9
0
        //窗体载入事件
        private void Strap_Load(object sender, EventArgs e)
        {
            if (Constant.RunPath == "")
            {
                Constant.RunPath = System.Environment.CurrentDirectory;
            }
              //  app = new Core.Sip.Client.App.CoreApp();
              //  app.Params = new Core.Sip.Client.App.BT_POINT();
              //  app.Params.FS_VIEDOIP = "10.32.18.100,4520,admin,admin";

              //  Core.Sip.Client.Meas.SsIpCamera camer = new Core.Sip.Client.Meas.SsIpCamera();

              //bool ttt=  camer.Init("10.32.18.100,4520,admin,admin");
              //ttt = camer.Login();
              //ttt = camer.Open();
            //string[] strParams = new string[5];
            //strParams = app.Params.FS_VIEDOIP.Split(new char[] { ',' });
              //  app.Cameras[0].Init("10.32.18.100,4520,admin,admin");
              //  app.Cameras[0].Login();
              //bool tt=  app.Cameras[0].RealPlay(pictureBox1.Handle);
            //VideoChannel1

            m_State = "0"; //第一次进入程序
            a = new GetBaseInfo();
            b = new BaseInfo();
            PointID = "K35";
            QueryPointBaseInfo();

            DownLoadFlow();
            //InitConfig();
            this.BuildMyTable();//构建内存表格式
            this.DownLoadMaterial(); //下载磅房对应物料信息到内存表
            this.DownLoadReceiver();  //下载磅房对应收货单位信息到内存表
            this.DownLoadSender();  //下载磅房对应发货单位信息到内存表
            this.DownLoadTrans();  //下载磅房对应承运单位信息到内存表

            string strPointID = PointID;
            this.BandPointMaterial(strPointID);
            this.BandPointMaterial(strPointID); //绑定磅房物料
            this.BandPointReceiver(strPointID); //绑定磅房收货单位
            this.BandPointSender(strPointID); //绑定磅房发货单位
            //this.tbJLD.Text = "G101皮带秤";
            this.cbPDH.Text = "0";
            this.tbKZ.Text = "0.0";
            this.tbJLY.Text = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();

            this.tbBC.Text = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder());
            this.tbBB.Text = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup());
            //QueryAndBindComboxes();
            BindFirstData();
            OpenYB();
            GetIPVedio();
            //GetVedio();
        }
Example #10
0
        //窗体初始化
        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();
        }
        private void HanderHistoryWeightData_Load(object sender, EventArgs e)
        {
            objBi = new BaseInfo(this.ob);
            getbaseinfo = new GetBaseInfo(this.ob);
            GetPoint();//绑定磅房下拉框

            InitConfig();
            this.BuildMyTable();//构建内存表格式
            this.DownLoadMaterial(); //下载磅房对应物料信息到内存表
            this.DownLoadReceiver();  //下载磅房对应收货单位信息到内存表
            this.DownLoadSender();  //下载磅房对应发货单位信息到内存表
            this.DownLoadTrans();  //下载磅房对应承运单位信息到内存表
            this.DownLoadCarNo(); //下载磅房对应车号信息到内存表
            this.DownLoadFlow();//下载磅房对应流向信息到内存表
            //this.DownLoadLoadPoint();//下载磅房对应装货点信息到内存表
            //this.DownLoadUnLoadPoint();//下载磅房对应卸货点信息到内存表
        }
Example #12
0
        /// <summary>
        /// 查询图像
        /// </summary>
        private void GetImage(string WeightNo)
        {
            if (WeightNo.Length <= 0)
                return;
            BaseInfo GetImage = new BaseInfo();
            GetImage.QueryCorrentionImage(WeightNo);
            DataTable dtTP = GetImage.dtImage;
            if (dtTP.Rows.Count > 0)
            {
                byte[] Image1 = (byte[])dtTP.Rows[0]["FB_IMAGE1"];
                GetImage.BitmapToImage(Image1, pictureBox1, 704, 576);
            }
            else
            {
                pictureBox1.Image = null;

            }
        }
Example #13
0
        private void ShowPic(string WeightNo)
        {
            if (WeightNo.Length <= 0)
               return;

               BaseInfo getImage = new BaseInfo();

               getImage.QueryPDImage(WeightNo);
               DataTable dtTP = getImage.dtImage;
               if (dtTP.Rows.Count > 0)
               {
               byte[] imagebytes1 = (byte[])dtTP.Rows[0]["FB_IMAGE1"];
               byte[] imagebytes2 = (byte[])dtTP.Rows[0]["FB_IMAGE2"];
               byte[] imagebytes3 = (byte[])dtTP.Rows[0]["FB_IMAGE3"];
               byte[] imagebytes4 = (byte[])dtTP.Rows[0]["FB_IMAGE4"];
               if (imagebytes3.Length > 1 && imagebytes4.Length >1)
               {
                   getImage.BitmapToImage(imagebytes1, pictureBox1, pictureBox1.Width, pictureBox1.Height);
                   getImage.BitmapToImage(imagebytes2, pictureBox2, pictureBox2.Width, pictureBox2.Height);
                   getImage.BitmapToImage(imagebytes3, pictureBox3, pictureBox3.Width, pictureBox3.Height);
                   getImage.BitmapToImage(imagebytes4, pictureBox4, pictureBox4.Width, pictureBox4.Height);
               }
               else
               {
                   getImage.BitmapToImage(imagebytes1, pictureBox1, pictureBox1.Width, pictureBox1.Height);
                   getImage.BitmapToImage(imagebytes2, pictureBox3, pictureBox3.Width, pictureBox3.Height);
               }
               }
               else
               {
               this.pictureBox1.Image = null;
               this.pictureBox2.Image = null;
               this.pictureBox3.Image = null;
               this.pictureBox4.Image = null;
               }
        }
Example #14
0
        //窗体载入事件
        private void Strap_Load(object sender, EventArgs e)
        {
            if (Constant.RunPath == "")
            {
                Constant.RunPath = System.Environment.CurrentDirectory;
            }

            DownLoadFlow();
            InitConfig();
            this.BuildMyTable();//构建内存表格式
            this.DownLoadMaterial(); //下载磅房对应物料信息到内存表
            this.DownLoadReceiver();  //下载磅房对应收货单位信息到内存表
            this.DownLoadSender();  //下载磅房对应发货单位信息到内存表
            this.DownLoadTrans();  //下载磅房对应承运单位信息到内存表

            string strPointID = PointID;
            this.BandPointMaterial(strPointID);
            this.BandPointMaterial(strPointID); //绑定磅房物料
            this.BandPointReceiver(strPointID); //绑定磅房收货单位
            this.BandPointSender(strPointID); //绑定磅房发货单位
            //this.BandPointTrans(strPointID); //绑定磅房承运单位

            m_State = "0"; //第一次进入程序
            a = new GetBaseInfo();
            b = new BaseInfo();

            QueryPointBaseInfo();

            //this.tbJLD.Text = "新焦皮带秤";
            this.cbPDH.Text = "0";
            this.tbKZ.Text = "0.0";
            this.tbJLY.Text = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            this.tbBC.Text = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder());
            this.tbBB.Text = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup());
            //QueryAndBindComboxes();
            BindFirstData();
            OpenYB();
            GetIPVedio();
            //GetVedio();
        }