Ejemplo n.º 1
0
 private void btnExit_Click(object sender, EventArgs e)
 {
     if (NP.MSGB("Do you want to exit this screen ?") == DialogResult.Yes)
     {
         this.Close();
     }
     else
     {
         return;
     }
 }
Ejemplo n.º 2
0
        private void btnOverview_Click(object sender, EventArgs e)
        {
            if (!NP.ReqField(this.txtBatchNumber, "Please enter Batch Number !!"))
            {
                return;
            }

            NP_Cls.SqlSelect = "SELECT     m_Material.MaterialCode, m_Material.MaterialName, m_Material.MaterialTypeName, m_Unit.UnitName FROM         m_Material INNER JOIN                       m_Unit ON m_Material.UnitCode = m_Unit.UnitCode WHERE     (m_Material.MaterialCode = (select MaterialCode from t_StockOverview where t_StockOverview.BatchNumber = N'" + this.txtBatchNumber.Text.Trim() + "')) AND (m_Material.FileStatus = N'1')";
            DataSet ds = new DataSet();

            ds = NP.GetClientDataSet(NP_Cls.SqlSelect);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (!ds.Tables[0].Rows[0]["MaterialCode"].ToString().Contains(NP_Cls.MatCodeForDO))
                {
                    NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "BacthNumber Not Match With MaterialCode !!");
                    this.lblMatCode.Text  = string.Empty;
                    this.lblMatName.Text  = string.Empty;
                    this.lblMatType.Text  = string.Empty;
                    this.lblUnit.Text     = string.Empty;
                    this.txtQuantity.Text = string.Empty;
                    this.txtBatchNumber.Select(); this.txtBatchNumber.SelectAll();
                    return;
                }

                this.lblMatCode.Text = ds.Tables[0].Rows[0]["MaterialCode"].ToString();
                this.lblMatName.Text = ds.Tables[0].Rows[0]["MaterialName"].ToString();
                this.lblMatType.Text = ds.Tables[0].Rows[0]["MaterialTypeName"].ToString();
                this.lblUnit.Text    = ds.Tables[0].Rows[0]["UnitName"].ToString();

                NP_Cls.SqlSelect = "SELECT MaterialCode,BatchNumber, UR FROM  t_StockOverview WHERE (BatchNumber = N'" + this.txtBatchNumber.Text.Trim() + "')";
                DataSet ds1 = new DataSet();
                ds1 = NP.GetClientDataSet(NP_Cls.SqlSelect);

                //LimitQty = Convert.ToDecimal(ds1.Tables[0].Rows[0]["UR"].ToString());

                this.txtQuantity.Text = Convert.ToDecimal(ds1.Tables[0].Rows[0]["UR"].ToString()).ToString("#,#0.000");
                this.txtQuantity.Select(); this.txtQuantity.SelectAll();
            }
            else
            {
                this.lblMatCode.Text          = string.Empty;
                this.lblMatName.Text          = string.Empty;
                this.lblMatType.Text          = string.Empty;
                this.lblUnit.Text             = string.Empty;
                this.txtQuantity.Text         = string.Empty;
                this.dataGridView1.DataSource = null;
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Data Not Found !!"); this.txtBatchNumber.Select(); this.txtBatchNumber.SelectAll(); return;
            }
        }
Ejemplo n.º 3
0
 private void GetData()
 {
     try
     {
         dsMT.ReadXml(NP_Cls.PathMT);
         this.dgvView.DataSource = dsMT.Tables[0];
     }
     catch (Exception ex)
     {
         NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Get Data :" + ex.Message); return;
     }
 }
Ejemplo n.º 4
0
 private void txtUserName_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
         {
             NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Please enter UserName: !!"); this.txtUserName.Select(); return;
         }
         else
         {
             this.txtPassword.Select();
         }
     }
 }
Ejemplo n.º 5
0
        private void frmGRProduction_Load(object sender, EventArgs e)
        {
            try
            {
                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtDocNo.Text = GetNumber(); this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");

                BindMat();

                Clear();
                this.cbPrdOrder.Text = string.Empty; this.cbPrdOrder.Select();
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }
Ejemplo n.º 6
0
        private void frmGoodsReturn_Load(object sender, EventArgs e)
        {
            try
            {
                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtDoc.Text = GetNumber(); this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");

                NP_Cls.SqlSelect = "SELECT DISTINCT VendorName, VendorCode FROM  t_GR WHERE (MovementType = N'101')";
                NP.BindCB(this.cbVendor, NP_Cls.SqlSelect, "VendorName", "VendorCode", "((( Select Vendor GR )))");

                this.MyGrid(dgvView);

                Clear();
                this.cbVendor.Text = string.Empty; this.cbVendor.Select();
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }
Ejemplo n.º 7
0
        public void ManageMenu()
        {
            try
            {
                string[] strPer = NP_Cls.dsAuth.Tables[0].Rows[0]["Per"].ToString().Split(':');

                // Master
                if ((Convert.ToBoolean(strPer[0].ToString()) == false) && (Convert.ToBoolean(strPer[1].ToString()) == false) && (Convert.ToBoolean(strPer[2].ToString()) == false) && (Convert.ToBoolean(strPer[3].ToString()) == false) && (Convert.ToBoolean(strPer[4].ToString()) == false) && (Convert.ToBoolean(strPer[5].ToString()) == false) && (Convert.ToBoolean(strPer[6].ToString()) == false) && (Convert.ToBoolean(strPer[7].ToString()) == false) && (Convert.ToBoolean(strPer[8].ToString()) == false))
                {
                    this.dataMasterToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.dataMasterToolStripMenuItem.Visible   = true;
                    this.vendorMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[0].ToString()); this.customerMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[1].ToString()); this.currencyMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[2].ToString()); this.plantMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[3].ToString()); this.locationMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[4].ToString()); this.materialGroupMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[5].ToString()); this.unitOfMeasureMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[6].ToString()); this.materialMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[7].ToString()); this.departmentMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[8].ToString());
                }


                // Authen
                if ((Convert.ToBoolean(strPer[9].ToString()) == false) && (Convert.ToBoolean(strPer[10].ToString()) == false))
                {
                    this.authToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.authToolStripMenuItem.Visible         = true;
                    this.employeeUserToolStripMenuItem.Visible = Convert.ToBoolean(strPer[9].ToString()); this.manageLevelToolStripMenuItem.Visible = Convert.ToBoolean(strPer[10].ToString());
                }

                // Puchasing
                if ((Convert.ToBoolean(strPer[11].ToString()) == false) && (Convert.ToBoolean(strPer[12].ToString()) == false))
                {
                    this.PurchasingToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.PurchasingToolStripMenuItem.Visible = true; this.vendorInfoRecordToolStripMenuItem.Visible = Convert.ToBoolean(strPer[11].ToString()); this.vendorSourceListToolStripMenuItem.Visible = Convert.ToBoolean(strPer[12].ToString());
                }

                // Production
                if ((Convert.ToBoolean(strPer[13].ToString()) == false) && (Convert.ToBoolean(strPer[14].ToString()) == false) && (Convert.ToBoolean(strPer[15].ToString()) == false) &&
                    (Convert.ToBoolean(strPer[16].ToString()) == false) && (Convert.ToBoolean(strPer[17].ToString()) == false) &&
                    (Convert.ToBoolean(strPer[18].ToString()) == false))
                {
                    this.ProductionToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.ProductionToolStripMenuItem.Visible       = true;
                    this.workCenterMasterToolStripMenuItem.Visible = Convert.ToBoolean(strPer[13].ToString());
                    this.routingToolStripMenuItem1.Visible         = Convert.ToBoolean(strPer[14].ToString());

                    this.productionOrderToolStripMenuItem.Visible = Convert.ToBoolean(strPer[15].ToString());
                    this.goodsIssueToolStripMenuItem.Visible      = Convert.ToBoolean(strPer[16].ToString());
                    this.gRProductionToolStripMenuItem.Visible    = Convert.ToBoolean(strPer[17].ToString());
                    this.productionCostToolStripMenuItem.Visible  = Convert.ToBoolean(strPer[18].ToString());
                }

                //
                this.BOMToolStripMenuItem.Visible = Convert.ToBoolean(strPer[19].ToString());

                // Order
                if ((Convert.ToBoolean(strPer[20].ToString()) == false) && (Convert.ToBoolean(strPer[21].ToString()) == false))
                {
                    this.pRPOToolStripMenuItem.Visible = false; this.pRToolStripMenuItem.Visible = false; this.pOToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.pRPOToolStripMenuItem.Visible = true; this.pRToolStripMenuItem.Visible = Convert.ToBoolean(strPer[20].ToString()); this.pOToolStripMenuItem.Visible = Convert.ToBoolean(strPer[21].ToString());
                }

                // Goods
                if ((Convert.ToBoolean(strPer[22].ToString()) == false) && (Convert.ToBoolean(strPer[23].ToString()) == false))
                {
                    this.gRGRTToolStripMenuItem.Visible = false; this.gRToolStripMenuItem.Visible = false; this.gTToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.gRGRTToolStripMenuItem.Visible = true; this.gRToolStripMenuItem.Visible = Convert.ToBoolean(strPer[22].ToString()); this.gTToolStripMenuItem.Visible = Convert.ToBoolean(strPer[23].ToString());
                }


                // SO
                if ((Convert.ToBoolean(strPer[24].ToString()) == false) && (Convert.ToBoolean(strPer[25].ToString()) == false))
                {
                    this.sOToolStripMenuItem.Visible = false; this.sOToolStripMenuItem1.Visible = false; this.deliveryOrderDOToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.sOToolStripMenuItem.Visible = true; this.sOToolStripMenuItem1.Visible = Convert.ToBoolean(strPer[24].ToString()); this.deliveryOrderDOToolStripMenuItem.Visible = Convert.ToBoolean(strPer[25].ToString());
                }

                this.mRPToolStripMenuItem.Visible = Convert.ToBoolean(strPer[24].ToString());

                //MRP
                if (Convert.ToBoolean(strPer[26].ToString()) == false)
                {
                    this.mRPToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.mRPToolStripMenuItem.Visible = Convert.ToBoolean(strPer[26].ToString());
                }

                // Stock
                if ((Convert.ToBoolean(strPer[27].ToString()) == false) && (Convert.ToBoolean(strPer[28].ToString()) == false) && (Convert.ToBoolean(strPer[29].ToString()) == false))
                {
                    this.stockOverviewToolStripMenuItem.Visible = false; this.overviewToolStripMenuItem.Visible = false;
                    this.transferStockToolStripMenuItem.Visible = false; this.matrialMovementToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.stockOverviewToolStripMenuItem.Visible   = true;
                    this.overviewToolStripMenuItem.Visible        = Convert.ToBoolean(strPer[27].ToString());
                    this.transferStockToolStripMenuItem.Visible   = Convert.ToBoolean(strPer[28].ToString());
                    this.matrialMovementToolStripMenuItem.Visible = Convert.ToBoolean(strPer[29].ToString());
                }


                // Stock
                if ((Convert.ToBoolean(strPer[27].ToString()) == false) && (Convert.ToBoolean(strPer[28].ToString()) == false) && (Convert.ToBoolean(strPer[29].ToString()) == false))
                {
                    this.stockOverviewToolStripMenuItem.Visible = false; this.overviewToolStripMenuItem.Visible = false;
                    this.transferStockToolStripMenuItem.Visible = false; this.matrialMovementToolStripMenuItem.Visible = false;
                }
                else
                {
                    this.stockOverviewToolStripMenuItem.Visible   = true;
                    this.overviewToolStripMenuItem.Visible        = Convert.ToBoolean(strPer[27].ToString());
                    this.transferStockToolStripMenuItem.Visible   = Convert.ToBoolean(strPer[28].ToString());
                    this.matrialMovementToolStripMenuItem.Visible = Convert.ToBoolean(strPer[29].ToString());
                }

                //Approve
                NP_Cls.AppBOM = Convert.ToByte(Convert.ToBoolean(strPer[30].ToString())); NP_Cls.AppPR = Convert.ToByte(Convert.ToBoolean(strPer[31].ToString()));
                NP_Cls.AppPO  = Convert.ToByte(Convert.ToBoolean(strPer[32].ToString())); NP_Cls.AppSO = Convert.ToByte(Convert.ToBoolean(strPer[33].ToString()));
            }
            catch
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "You have not Perrmission to use this Program !!\nPlease contact your Administrator ..");
                Application.Exit(); return;
            }
        }
Ejemplo n.º 8
0
        private void cbProdOrder_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cbProdOrder.SelectedIndex > 0)
            {
                NP_Cls.SqlSelect = "SELECT     PrdONumber, PrdODate, MaterialCode, MaterialName, PrdQuantity, PlantCode, PlantName, BOMVersion, LocCode, LocName, Remark, UserCreate,       DateCreate, UserUpdate, DateUpdate, IsGI, MRPOrder, ISGRPrd, LogDate, IsPicking FROM         t_PrdOrder WHERE  (PrdONumber = N'" + this.cbProdOrder.SelectedValue.ToString() + "')";
                DataSet dsTmp = new DataSet(); dsTmp = NP.GetClientDataSet(NP_Cls.SqlSelect);
                if (dsTmp.Tables[0].Rows.Count > 0)
                {
                    this.lblMaterialCode.Text = dsTmp.Tables[0].Rows[0]["MaterialCode"].ToString();
                    this.lblPlantCode.Text    = dsTmp.Tables[0].Rows[0]["PlantCode"].ToString();

                    NP_Cls.SqlSelect = "SELECT WorkCenterCode, WorkCenterCode AS WorkCenterName FROM m_WorkCenter WHERE (FileStatus = '1') OR (PlantCode = N'" + this.lblPlantCode.Text.Trim() + "')";
                    NP.BindCB(this.cbWorkCenter, NP_Cls.SqlSelect, "WorkCenterCode", "WorkCenterName", "((( Select WorkCenter )))");

                    this.cbWorkCenter.Select();
                }
                else
                {
                    NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Data Not Found !!"); return;
                }
            }
            else
            {
                Clear(); this.cbProdOrder.SelectedIndex = 0;
                this.cbProdOrder.Select();
            }
        }
Ejemplo n.º 9
0
        private void frmDO_Load(object sender, EventArgs e)
        {
            try
            {
                this.dsBatch = new DataSet();

                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtDO.Text = GetNumber(); this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");

                BindCBCustomer();

                this.MyGrid(dgvView);
                Clear();
                this.cbCustomer.Text = string.Empty; this.cbCustomer.Select();
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }
Ejemplo n.º 10
0
        private void frmGI_Load(object sender, EventArgs e)
        {
            try
            {
                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtGI.Text = GetNumber(); this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");
                this.MyGrid(dgvView);

                NP_Cls.SqlSelect = "SELECT     MaterialCode + ':' + MaterialName AS MatCode, PrdONumber FROM  t_PrdOrder WHERE (IsGI = 0)";
                NP.BindCB(this.cbPrdoOrder, NP_Cls.SqlSelect, "MatCode", "PrdONumber", "((( Select Prd Number )))"); Clear(); this.cbPrdoOrder.Text = string.Empty;
                this.cbPrdoOrder.Select();
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }
Ejemplo n.º 11
0
 private void BuildVersion()
 {
     try
     {
         NP_Cls.SqlSelect = "SELECT BOMVersion FROM t_BOM WHERE (MaterialCode = '" + this.cbMaterial.SelectedValue + "') AND (PlantCode = '" + this.cbPlant.SelectedValue + "') Order By BOMVersion DESC";
         DataSet ds = new DataSet(); ds = NP.GetClientDataSet(NP_Cls.SqlSelect);
         if (ds.Tables[0].Rows.Count > 0)
         {
             this.strVersion = (Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString()) + 1).ToString();
         }
         else
         {
             this.strVersion = "0";
         }
     }
     catch (Exception ex)
     {
         NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Ver : " + ex.Message); return;
     }
 }
Ejemplo n.º 12
0
        private void btnExit_Click(object sender, EventArgs e)
        {
            if (this.dQtyChk != 0)
            {
                if (NP.MSGB("Qty of Component are not equal Qty of BOM !!\nThe transaction will be reject , Do you want to exit out of save ?") == DialogResult.Yes)
                {
                    // Delete all Transaction
                    oConn = new SqlConnection(NP.ReadFileDB(NP_Cls.PathDB));
                    if (oConn.State == ConnectionState.Open)
                    {
                        oConn.Close();
                    }
                    oConn.Open(); SqlTransaction Tr; Tr = oConn.BeginTransaction();
                    try
                    {
                        SqlCommand cmdDel = new SqlCommand();
                        NP_Cls.SqlSelect = "SELECT BOMDetailCode FROM t_BOMDetail WHERE (BOMCode = @BOMCode)";
                        cmdDel.Parameters.Add("@BOMCode", SqlDbType.Int).Value = Convert.ToInt32(NP_Cls.hBOM["BOMCode"].ToString());
                        cmdDel.Connection = oConn; cmdDel.CommandText = NP_Cls.SqlSelect; cmdDel.Transaction = Tr;
                        SqlDataAdapter da = new SqlDataAdapter(cmdDel); DataSet ds = new DataSet(); da.Fill(ds);

                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            NP_Cls.SqlDel = "DELETE FROM t_BOMDetail WHERE (BOMCode = @BOMCode)";
                            //cmdDel.Parameters.Add("@BOMCode", SqlDbType.Int).Value = this.dgvView["clnBOMCode", this.dgvView.CurrentRow.Index].Value;
                            cmdDel.Parameters.Add("@BOMDetailCode", SqlDbType.Int).Value = this.dgvView["clnBOMDetailCode", this.dgvView.CurrentRow.Index].Value;
                            cmdDel.Connection = oConn; cmdDel.CommandText = NP_Cls.SqlDel; cmdDel.Transaction = Tr;
                            cmdDel.ExecuteNonQuery();

                            NP_Cls.SqlDel     = "DELETE FROM t_BOM WHERE (BOMCode = @BOMCode)";
                            cmdDel.Connection = oConn; cmdDel.CommandText = NP_Cls.SqlDel; cmdDel.Transaction = Tr;
                            cmdDel.ExecuteNonQuery();

                            if (NP._TRanSave(oConn, Tr, NP_Cls.NPTranType.Delete, "t_BOM:t_BOMDetail", NP_Cls.strUsr))
                            {
                                Tr.Commit();
                                this.Close();
                            }
                            else
                            {
                                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Try agian !!"); return;
                            }
                        }
                        else // Has Row
                        {
                            NP_Cls.SqlDel     = "DELETE FROM t_BOM WHERE (BOMCode = @BOMCode)";
                            cmdDel.Connection = oConn; cmdDel.CommandText = NP_Cls.SqlDel; cmdDel.Transaction = Tr;
                            cmdDel.ExecuteNonQuery();

                            if (NP._TRanSave(oConn, Tr, NP_Cls.NPTranType.Delete, "t_BOM", NP_Cls.strUsr))
                            {
                                Tr.Commit();
                                this.Close();
                            }
                            else
                            {
                                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Try agian !!"); return;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        if (oConn.State == ConnectionState.Open)
                        {
                            Tr.Rollback();
                        }
                        NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Delete : " + ex.Message); return;
                    }
                    finally
                    {
                        if (oConn.State == ConnectionState.Open)
                        {
                            oConn.Close();
                        }
                    }
                    //
                }
                else
                {
                    return;
                }
            }
            else
            {
                if (NP.MSGB("Do you want to exit this screen ?") == DialogResult.Yes)
                {
                    this.Close();
                }
                else
                {
                    return;
                }
            }
        }
Ejemplo n.º 13
0
        private void frmBorrow_Load(object sender, EventArgs e)
        {
            try
            {
                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");
                this.MyGrid(dgvView);
                BindCB();
                this.txtQty.Enabled = true;
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }
Ejemplo n.º 14
0
 public void GenVCode()
 {
     try
     {
         NP_Cls.SqlSelect = "SELECT TmpValidPeriodsCode FROM tmp_GenCode";
         Int64 iCode = Convert.ToInt64(NP.GetClientDataSet(NP_Cls.SqlSelect).Tables[0].Rows[0][0].ToString());
         iCode += 1; string strErr = string.Empty;
         if (NP.SqlCmd("UPDATE tmp_GenCode SET TmpValidPeriodsCode = " + iCode, ref strErr))
         {
             NP_Cls.strValidCode = iCode.ToString();
         }
         else
         {
             NP.MSGB(NP_Cls.NPMgsStyle.WarningType, strErr);
             return;
         }
     }
     catch (Exception ex)
     {
         NP.MSGB(NP_Cls.NPMgsStyle.WarningType, ex.Message); return;
     }
 }
Ejemplo n.º 15
0
        private void frmTransferStatus_Load(object sender, EventArgs e)
        {
            try
            {
                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtPR.Text = GetNumber(); this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");
                this.MyGrid(dgvView);
                CreateMovType();
                Clear(); this.lblUserCreate.Text = NP_Cls.strUsr;
                this.cbMovType.Text = string.Empty; this.cbMovType.Select();
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }
Ejemplo n.º 16
0
        private void frmPrdOrder_Load(object sender, EventArgs e)
        {
            try
            {
                WMS.LoginSystem.frmMainMenu frm = (WMS.LoginSystem.frmMainMenu)Application.OpenForms["frmMainMenu"];
                frm.menuStrip1.Enabled = true;

                this.txtPrdOrder.Text = GetNumber(); this.txtDocDate.Text = NP.GetDateServer().ToString("dd/MM/yyyy");
                this.MyGrid(dgvView);
                if (NP_Cls.FromMRP == 0)
                {
                    BindMat();
                    this.txtQty.Enabled = true;
                }
                else
                {
                    NP_Cls.SqlSelect = "SELECT     MaterialName, MaterialCode FROM m_Material WHERE  (FileStatus = N'1') AND (ProcurementType = N'E') AND (MaterialCode = '" + NP_Cls.MRPFGSort + "')";
                    NP.BindCB(this.cbMaterialCode, NP_Cls.SqlSelect, "MaterialName", "MaterialCode", "((( Select Material )))");
                    this.cbMaterialCode.SelectedIndex = 1; this.txtQty.Text = NP_Cls.MRPQty.ToString();
                    this.txtQty.Enabled = true;
                }
            }
            catch (Exception ex)
            {
                NP.MSGB(NP_Cls.NPMgsStyle.WarningType, "Load : " + ex.Message); return;
            }
        }