Exemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     ClearAll();
     ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterNew);
     grpSupplier.Enabled = true;
     txtSupplierName.Focus();
 }
Exemplo n.º 2
0
        private void frmOtherSetting_Load(object sender, EventArgs e)
        {
            btnAdd.BackgroundImage    = B_Leave;
            btnSave.BackgroundImage   = B_Leave;
            btnEdit.BackgroundImage   = B_Leave;
            btnUpdate.BackgroundImage = B_Leave;
            btnDelete.BackgroundImage = B_Leave;
            btnCancel.BackgroundImage = B_Leave;

            btnFooterCancel.BackgroundImage  = B_Leave;
            btnFooterSave.BackgroundImage    = B_Leave;
            btnPrinterSave.BackgroundImage   = B_Leave;
            btnPrinterCancel.BackgroundImage = B_Leave;

            ObjUtil.RegisterCommandButtons(btnAdd, btnSave, btnEdit, btnUpdate, btnDelete, btnCancel);
            ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning);

            lblPCName.Text      = Environment.MachineName;
            txtMachineName.Text = Environment.MachineName;

            LoadStore();
            Load_PC_Store_Mapping();
            BindStoreSettingData();
            LoadPrinter();
            BindPrinterDetails();
            LoadData();
            ClearAll();

            groupBox1.Enabled = false;
        }
Exemplo n.º 3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     ClearAll();
     //ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterNew, clsUtility.IsAdmin);
     ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterNew);
     grpStore.Enabled = true;
     txtStoreName.Focus();
 }
Exemplo n.º 4
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     ClearAll();
     //ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterNew, clsUtility.IsAdmin);
     ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterNew);
     grpClosingBALMaster.Enabled = true;
     txtCashBand.Focus();
 }
Exemplo n.º 5
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     ClearAll();
     ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterNew);
     grpPurchaseInvoice.Enabled = true;
     grpForeignCurrency.Enabled = true;
     grpLocalCurrency.Enabled   = true;
     txtSupplierBillNo.Focus();
 }
Exemplo n.º 6
0
        private void Employee_Details_Load(object sender, EventArgs e)
        {
            dtpDOB.ShowCheckBox = true;
            dtpDOB.Checked      = false;

            btnAdd.BackgroundImage    = B_Leave;
            btnSave.BackgroundImage   = B_Leave;
            btnEdit.BackgroundImage   = B_Leave;
            btnUpdate.BackgroundImage = B_Leave;
            btnDelete.BackgroundImage = B_Leave;
            btnCancel.BackgroundImage = B_Leave;

            ObjUtil.RegisterCommandButtons(btnAdd, btnSave, btnEdit, btnUpdate, btnDelete, btnCancel);
            ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning);

            LoadData();
        }
Exemplo n.º 7
0
        private void frmUserRights_Load(object sender, EventArgs e)
        {
            btnAdd.BackgroundImage    = B_Leave;
            btnSave.BackgroundImage   = B_Leave;
            btnEdit.BackgroundImage   = B_Leave;
            btnUpdate.BackgroundImage = B_Leave;
            btnDelete.BackgroundImage = B_Leave;
            btnCancel.BackgroundImage = B_Leave;

            ObjUtil.RegisterCommandButtons(btnAdd, btnSave, btnEdit, btnUpdate, btnDelete, btnCancel);
            ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning);

            InitRightTable();
            LoadRightGrid();
            loadUser();
        }
        private void Delivering_Purchase_Bill_Load(object sender, EventArgs e)
        {
            btnAdd.BackgroundImage    = B_Leave;
            btnSave.BackgroundImage   = B_Leave;
            btnEdit.BackgroundImage   = B_Leave;
            btnUpdate.BackgroundImage = B_Leave;
            btnDelete.BackgroundImage = B_Leave;
            btnCancel.BackgroundImage = B_Leave;
            btnSearch.BackgroundImage = B_Leave;

            ObjUtil.RegisterCommandButtons(btnAdd, btnSave, btnEdit, btnUpdate, btnDelete, btnCancel);
            ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning);

            FillStoreData();
            FillSizeTypeData();
            FillCountryData();
            FillBrandData();
            FillCategoryData();
            //InitItemTable();
        }
        private void Currency_Value_Settings_Load(object sender, EventArgs e)
        {
            //clsUtility.IsAdmin = true;//removed

            btnAdd.BackgroundImage    = B_Leave;
            btnSave.BackgroundImage   = B_Leave;
            btnEdit.BackgroundImage   = B_Leave;
            btnUpdate.BackgroundImage = B_Leave;
            btnDelete.BackgroundImage = B_Leave;
            btnCancel.BackgroundImage = B_Leave;

            ObjUtil.RegisterCommandButtons(btnAdd, btnSave, btnEdit, btnUpdate, btnDelete, btnCancel);
            ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning);
            //ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning, clsUtility.IsAdmin);
            LoadData();
            FillCountryData();
        }
Exemplo n.º 10
0
        private void frmUserManagement_Load(object sender, EventArgs e)
        {
            //clsUtility._UserMessageType = clsUtility.MessageType.SparklePurple;
            //clsUtility._UserMessageType = clsUtility.MessageType.Office2010Blue;

            LoadTheme();

            EnableDisable(false);

            //DBName = ObjDAL.GetCurrentDBName(true);

            //string a = ObjDAL.ReadConStringFromFile("AppConfig/ServerConfig.sc", true);
            //string[] arr = a.Split(new char[] { ';', '=' });
            //DBName = arr[3].ToString();
            LoadData();

            ObjUtil.RegisterCommandButtons(btnAdd, btnSave, btnEdit, btnUpdate, btnDelete, btnCancel);
            ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.Beginning, admin);
        }
Exemplo n.º 11
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (clsFormRights.HasFormRight(clsFormRights.Forms.Purchase_Bill_Details, clsFormRights.Operation.Save) || clsUtility.IsAdmin)
            {
                DataTable dtPurchaseInvoiceBill = (DataTable)dataGridView1.DataSource;
                if (ObjUtil.ValidateTable(dtPurchaseInvoiceBill))
                {
                    int  _ID = 0;
                    bool b   = false;
                    for (int i = 0; i < dtPurchaseInvoiceBill.Rows.Count; i++)
                    {
                        _ID = 0;
                        ObjDAL.SetColumnData("PurchaseInvoiceID", SqlDbType.Int, PurchaseInvoiceID);
                        ObjDAL.SetColumnData("SupplierBillNo", SqlDbType.NVarChar, txtSupplierBillNo.Text.Trim());
                        ObjDAL.SetColumnData("SupplierID", SqlDbType.Int, cmbSupplier.SelectedValue);
                        ObjDAL.SetColumnData("BillDate", SqlDbType.Date, dtpBillDate.Value.ToString("yyyy-MM-dd"));
                        ObjDAL.SetColumnData("CreatedBy", SqlDbType.Int, clsUtility.LoginID); //if LoginID=0 then Test Admin else user
                        _ProductID = Convert.ToInt32(dtPurchaseInvoiceBill.Rows[i]["ProductID"]);
                        ObjDAL.SetColumnData("ProductID", SqlDbType.Int, _ProductID);
                        ObjDAL.SetColumnData("ModelNo", SqlDbType.NVarChar, dtPurchaseInvoiceBill.Rows[i]["ModelNo"].ToString());
                        ObjDAL.SetColumnData("BrandID", SqlDbType.Int, dtPurchaseInvoiceBill.Rows[i]["BrandID"].ToString());
                        _QTY = Convert.ToInt32(dtPurchaseInvoiceBill.Rows[i]["QTY"]);
                        ObjDAL.SetColumnData("QTY", SqlDbType.Int, _QTY);
                        ObjDAL.SetColumnData("Rate", SqlDbType.Decimal, dtPurchaseInvoiceBill.Rows[i]["Rate"].ToString());
                        ObjDAL.SetColumnData("Sales_Price", SqlDbType.Decimal, dtPurchaseInvoiceBill.Rows[i]["EndUser"].ToString());
                        ObjDAL.SetColumnData("AddedRatio", SqlDbType.Int, dtPurchaseInvoiceBill.Rows[i]["AddedRatio"].ToString());
                        ObjDAL.SetColumnData("SuppossedPrice", SqlDbType.Decimal, dtPurchaseInvoiceBill.Rows[i]["SuppossedPrice"].ToString());

                        _ID = ObjDAL.InsertData(clsUtility.DBName + ".dbo.PurchaseInvoiceDetails", true);

                        //Updating Sales price in Product Master table for sales window
                        ObjDAL.UpdateColumnData("Rate", SqlDbType.Decimal, dtPurchaseInvoiceBill.Rows[i]["EndUser"]);
                        ObjDAL.UpdateData(clsUtility.DBName + ".dbo.ProductMaster", "ProductID = " + _ProductID + "");
                    }

                    if (_ID > 0)
                    {
                        //ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterSave, clsUtility.IsAdmin);
                        ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterSave);
                        if (txtDiffQty.Text == "0" && txtDiffValue.Text == "0")
                        {
                            clsUtility.ShowInfoMessage("Purchase Invoice is Saved Successfully..", clsUtility.strProjectTitle);
                        }
                        ClearAll();
                        grpPurchaseBillDetail.Enabled = false;
                    }
                    else
                    {
                        clsUtility.ShowInfoMessage("Purchase Invoice is not Saved Successfully..", clsUtility.strProjectTitle);
                    }
                    ObjDAL.ResetData();
                }
                else
                {
                    //ObjDAL.UpdateColumnData("SupplierBillNo", SqlDbType.VarChar, txtSupplierBillNo.Text.Trim());
                    //ObjDAL.UpdateColumnData("ProductID", SqlDbType.Int, txtProductID.Text.Trim());
                    //ObjDAL.UpdateColumnData("ModelNo", SqlDbType.NVarChar, txtModelNo.Text.Trim());
                    //ObjDAL.UpdateColumnData("BrandID", SqlDbType.Int, cmbBrand.SelectedValue);
                    //ObjDAL.UpdateColumnData("QTY", SqlDbType.Int, txtQTY.Text);
                    //ObjDAL.UpdateColumnData("Rate", SqlDbType.Decimal, txtRate.Text.Trim());
                    //ObjDAL.UpdateColumnData("UpdatedBy", SqlDbType.Int, clsUtility.LoginID); //if LoginID=0 then Test
                    //ObjDAL.UpdateColumnData("UpdatedOn", SqlDbType.DateTime, DateTime.Now);

                    //if (ObjDAL.UpdateData(clsUtility.DBName + ".dbo.PurchaseInvoiceDetails", "PurchaseInvoiceID = " + PurchaseInvoiceID + "") > 0)
                    //{
                    //    ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterUpdate, clsUtility.IsAdmin);
                    //    ObjUtil.SetCommandButtonStatus(clsCommon.ButtonStatus.AfterUpdate);

                    //    clsUtility.ShowInfoMessage("Purchase Invoice for '" + cmbSupplier.SelectedItem + "' is Updated", clsUtility.strProjectTitle);
                    //    ClearAll();
                    //    grpPurchaseBillDetail.Enabled = false;
                    //    ObjDAL.ResetData();
                    //}
                    //else
                    //{
                    //    clsUtility.ShowInfoMessage("Purchase Invoice for '" + cmbSupplier.SelectedItem + "' is not Updated", clsUtility.strProjectTitle);
                    //    ObjDAL.ResetData();
                    //}
                }
            }
            else
            {
                clsUtility.ShowInfoMessage("You have no rights to perform this task", clsUtility.strProjectTitle);
            }
            dataGridView1.DataSource = dtPurchaseInvoice;
        }