Пример #1
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass      = new SapClass(this.ob);
            ugpData.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            lblScr.Text  += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            getStrWhere();

            showGridInfo();
        }
Пример #2
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass     = new SapClass(this.ob);
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();

            // txtKcd.Text = "1310";//玉钢线材库

            getStrWhere();

            showGridInfo();
        }
Пример #3
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass     = new SapClass(this.ob);
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            try
            {
                strKey = this.CustomInfo.ToUpper();
            }
            catch (Exception E1)
            { }

            getStrWhere();

            showGridInfo();
        }
Пример #4
0
        private void UpSap_KeyPress(object sender, KeyPressEventArgs e)
        {
            sapClass = new SapClass(this.ob);

            if (e.KeyChar == (char)13)
            {
                Control c  = GetNextControl(this.ActiveControl, true);
                bool    ok = SelectNextControl(this.ActiveControl, true, true, true, true);
                if (ok && c != null)
                {
                    if (c is System.Windows.Forms.TextBox)
                    {
                        ((System.Windows.Forms.TextBox)c).SelectAll();
                    }
                    if (c.TabIndex == 12)
                    {
                        return;
                    }
                }
            }
        }
Пример #5
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass = new SapClass(this.ob);
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();

               // txtKcd.Text = "1352";//1352玉钢钢坯库

            getStrWhere();

            showGridInfo();
        }
Пример #6
0
        private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            sapClass = new SapClass(this.ob);
            lstHint1.Items.Clear();
            lstHint2.Items.Clear();

            switch (e.Tool.Key.ToString())
            {
                //case "Cancel":
                //    {
                //        doUpdate(1);
                //        showGridInfo();
                //        break;
                //    }
                case "Find":
                    {
                        if (!getStrWhere())
                            break;
                        showGridInfo();
                        break;
                    }
                case "Edit":
                    {
                        doUpdate();
                        showGridInfo();
                        break;
                    }
                case "UpSap":
                    {
                        upLoadData();
                        break;
                    }
                case "ToExcel":
                    {
                        Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData);
                        if(Constant.WaitingForm!=null)
                        Constant.WaitingForm.Close();
                        break;
                    }
                case "InExcel":
                    {
                        ArrayList lstTmp = new ArrayList();
                       // lstTmp = sapClass.ExcelToDatabase(2, "棒线厂四作");
                        lstTmp = sapClass.ExcelToDatabase(2, CoreFS.SA06.CoreUserInfo.UserInfo.GetDepartment());
                        foreach (string strTmpValue in lstTmp)
                        {
                            lstHint2.Items.Add(strTmpValue);
                        }
                        showGridInfo();
                        break;
                    }
            }
        }
Пример #7
0
        private void UpSap_KeyPress(object sender, KeyPressEventArgs e)
        {
            sapClass = new SapClass(this.ob);

            if (e.KeyChar == (char)13)
            {
                Control c = GetNextControl(this.ActiveControl, true);
                bool ok = SelectNextControl(this.ActiveControl, true, true, true, true);
                if (ok && c != null)
                {
                    if (c is System.Windows.Forms.TextBox)
                    {
                        ((System.Windows.Forms.TextBox)c).SelectAll();
                    }
                    if (c.TabIndex == 12) return;
                }
            }
        }
Пример #8
0
        private void uToolBar_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            sapClass = new SapClass(this.ob);
            lstHint1.Items.Clear();
            lstHint2.Items.Clear();

            switch (e.Tool.Key.ToString())
            {
            //case "Cancel":
            //    {
            //        doUpdate(1);
            //        showGridInfo();
            //        break;
            //    }
            case "Find":
            {
                if (!getStrWhere())
                {
                    break;
                }
                showGridInfo();
                break;
            }

            case "Edit":
            {
                doUpdate();
                showGridInfo();
                break;
            }

            case "UpSap":
            {
                upLoadData();
                break;
            }

            case "ToExcel":
            {
                Constant.ExportGrid2Excel(this, this.ultraGridExcelExporter1, uGridData);
                if (Constant.WaitingForm != null)
                {
                    Constant.WaitingForm.Close();
                }
                break;
            }

            case "InExcel":
            {
                ArrayList lstTmp = new ArrayList();
                // lstTmp = sapClass.ExcelToDatabase(2, "棒线厂四作");
                lstTmp = sapClass.ExcelToDatabase(2, CoreFS.SA06.CoreUserInfo.UserInfo.GetDepartment());
                foreach (string strTmpValue in lstTmp)
                {
                    lstHint2.Items.Add(strTmpValue);
                }
                showGridInfo();
                break;
            }
            }
        }
Пример #9
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass = new SapClass(this.ob);
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            try
            {
                strKey = this.CustomInfo.ToUpper();

            }
            catch (Exception E1)
            { }

            getStrWhere();

            showGridInfo();
        }
Пример #10
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass = new SapClass(this.ob);
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            strDepartMent = CoreFS.SA06.CoreUserInfo.UserInfo.GetDepartment();
            strWhere = " AND (FD_DATETIME BETWEEN to_date('" + qDteBegin.Value.ToString("yyyy-MM-dd  00:00:00") + "','yyyy-MM-dd hh24:mi:ss') AND to_date('"
                + qDteEnd.Value.ToString("yyyy-MM-dd 23:59:59") + "','yyyy-MM-dd hh24:mi:ss'))";
            //strWhere += " AND FS_POINTID = 'K15'";

            strWhere += " AND FS_UPLOADFLAG = '0'";
            strWhere += " AND FS_COMPLETEFLAG = '1'";
            //strWhere += " AND FS_SAPSTORE = '1311'";//玉钢型材库存地
            //strWhere += " AND (FS_AUDITOR = '' OR FS_AUDITOR IS NULL)";
             /*   if ((CoreFS.SA06.CoreUserInfo.UserInfo.GetRole() == "BXC1002") ||
                (CoreFS.SA06.CoreUserInfo.UserInfo.GetRole() == "BXC1001"))
            {
                strWhere += " AND FS_BATCHNO LIKE ('2%')";
                ckTheory.Enabled = false;
                txtKcd.Text = "1450";
            }

            if (CoreFS.SA06.CoreUserInfo.UserInfo.GetRole() == "BXC2001")
            {
                strWhere += " AND FS_BATCHNO LIKE ('1%')";
                ckTheory.Enabled = true;
            }*/

            showGridInfo();
        }
Пример #11
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass = new SapClass(this.ob);
            ugpData.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            getStrWhere();

            showGridInfo();
        }
Пример #12
0
        private void UpSap_Load(object sender, EventArgs e)
        {
            sapClass = new SapClass(this.ob);
            lblScr.Text += CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            strDepartMent = CoreFS.SA06.CoreUserInfo.UserInfo.GetDepartment();
            try
            {
                strKey = this.CustomInfo.ToUpper();

            }
            catch (Exception E1)
            {
            }
            strWhere = " AND (FD_DATETIME BETWEEN to_date('" + qDteBegin.Value.ToString("yyyy-MM-dd  00:00:00") + "','yyyy-MM-dd hh24:mi:ss') AND to_date('"
                + qDteEnd.Value.ToString("yyyy-MM-dd 23:59:59") + "','yyyy-MM-dd hh24:mi:ss'))";
            //strWhere += " AND FS_POINTID = 'K15'";

            strWhere += " AND FS_UPLOADFLAG = '0'";
            switch (strKey)
            {
                case "ZF":
                    strWhere += " AND  (FS_BATCHNO like '%TZ%' OR FS_BATCHNO LIKE '%TX%' ) ";
                    break;
                case "LH":
                    strWhere += "  AND  (FS_BATCHNO like '%TL%' OR FS_BATCHNO LIKE '%TG%' ) ";
                    break;
                default:

                    break;

            }

            //strWhere += " AND FS_SAPSTORE = '1311'";//玉钢型材库存地
            //strWhere += " AND (FS_AUDITOR = '' OR FS_AUDITOR IS NULL)";
             /*   if ((CoreFS.SA06.CoreUserInfo.UserInfo.GetRole() == "BXC1002") ||
                (CoreFS.SA06.CoreUserInfo.UserInfo.GetRole() == "BXC1001"))
            {
                strWhere += " AND FS_BATCHNO LIKE ('2%')";
                ckTheory.Enabled = false;
                txtKcd.Text = "1450";
            }

            if (CoreFS.SA06.CoreUserInfo.UserInfo.GetRole() == "BXC2001")
            {
                strWhere += " AND FS_BATCHNO LIKE ('1%')";
                ckTheory.Enabled = true;
            }*/

            showGridInfo();
        }