Exemplo n.º 1
0
        private void LoadItemList1()
        {
            try
            {
                NameValueCollection para = new NameValueCollection();

                dtItemList = objList.ListOfRecord("usp_Item_StockItemLOV", para, "MaterialIssue - LoadItemList");

                if (objList.Exception == null)
                {
                    txtItemName.AutoCompleteSource = AutoCompleteSource.CustomSource;
                    txtItemName.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                    AutoCompleteStringCollection Data = new AutoCompleteStringCollection();
                    for (int i = 0; i < dtItemList.Rows.Count; i++)
                    {
                        Data.Add(dtItemList.Rows[i]["ItemName"].ToString());
                    }
                    txtItemName.AutoCompleteCustomSource = Data;
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("MaterialIssue", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 2
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para1 = new NameValueCollection();
                _CompId = CurrentCompany.CompId;
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());

                dtblCustomer = objList.ListOfRecord("usp_Vendor_PendingPaymentList", para1, "Vendor - PaymentPendingList");
                if (objList.Exception == null)
                {
                    ArrangeDataGridView();
                    dgvContacts.AutoGenerateColumns = false;
                    dgvContacts.DataSource          = dtblCustomer;
                    ArrangeDataGridView();
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Contacts - LoadList", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 3
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para1 = new NameValueCollection();
                _CompId = CurrentCompany.CompId;
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());
                para1.Add("@i_UserId", CurrentUser.UserID.ToString());

                dtblPI = objList.ListOfRecord("usp_Reminder_List", para1, "Invoice - LoadList");
                if (dtblPI != null)
                {
                    if (objList.Exception == null)
                    {
                        ArrangeDataGridView();
                        dgvInvoice.AutoGenerateColumns = false;
                        dgvInvoice.DataSource          = dtblPI;
                        ArrangeDataGridView();
                    }
                    else
                    {
                        MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Invoice-LoadList", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 4
0
        public void LoadList()
        {
            try
            {
                NameValueCollection Paralist = new NameValueCollection();
                Paralist.Add("@i_UserID", CurrentUser.UserID.ToString());
                if (_isForSale)
                {
                    dtblLOV = CommList.ListOfRecord("usp_Sale_LOV", null, "LeadLOV - LoadList");
                }
                else
                {
                    dtblLOV = CommList.ListOfRecord("usp_Lead_LOV", null, "LeadLOV - LoadList");
                }
                if (CommList.Exception != null)
                {
                    MessageBox.Show(CommList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                dgvLOV.DataSource = dtblLOV;
                ArrangeDataGridView();
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Lead LOV", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 5
0
 private void frmQuotationItemEntry_Load(object sender, EventArgs e)
 {
     AddHandlers(this);
     SetControlsDefaults(this);
     objCommon.FillTaxClassCombo(cmbTaxClass);
     objCommon.FillGodownCombo(cmbgodown);
     objCommon.FillCurrencyCombo(cmbCurrency);
     if (_Mode == (int)Common.Constant.Mode.Modify)
     {
         _ItemID              = _ItemID_Edit;
         _GodownID            = _GodownID_Edit;
         txtItemName.ReadOnly = true;
         btnItemLOV.Visible   = false;
         cmbgodown.Enabled    = false;
         //NameValueCollection para = new NameValueCollection();
         ////  para.Add("@i_FYID", CurrentUser.FYID.ToString());
         //para.Add("@i_ItemID", _ItemID.ToString());
         //para.Add("@i_GodownID", _godown.ToString());
         //dtItem = objList.ListOfRecord("usp_Item_QOH", para, "SalesInvoice - LoadList");
         //if (dtItem.Rows.Count > 0)
         //{
         //    txtQOH.Text = dtItem.Rows[0]["QOH"].ToString();
         //}
         NameValueCollection para1 = new NameValueCollection();
         para1.Add("@i_ItemID", _ItemID.ToString());
         para1.Add("@i_GodownID", _GodownID.ToString());
         para1.Add("@i_QuotationID", _PIID.ToString());
         dtQuotationItem = objList.ListOfRecord("usp_Item_Quotation_edit", para1, "Quotation - LoadList");
         if (dtQuotationItem.Rows.Count > 0)
         {
             txtItemName.Text          = dtQuotationItem.Rows[0]["ItemName"].ToString();
             txtUOM.Text               = dtQuotationItem.Rows[0]["UOM"].ToString();
             txtRate.Text              = dtQuotationItem.Rows[0]["Rate"].ToString();
             txtQty.Text               = dtQuotationItem.Rows[0]["Qty"].ToString();
             txtAmount.Text            = dtQuotationItem.Rows[0]["Amount"].ToString();
             txtamtdiscount.Text       = dtQuotationItem.Rows[0]["Amount"].ToString();
             txtdiscopunt.Text         = dtQuotationItem.Rows[0]["Discount"].ToString();
             cmbTaxClass.SelectedValue = Convert.ToInt32(dtQuotationItem.Rows[0]["TaxClassID"]);
             txtItemDesc.Text          = dtQuotationItem.Rows[0]["ItemDesc"].ToString();
             cmbgodown.SelectedValue   = Convert.ToInt32(dtQuotationItem.Rows[0]["GodownID"]);
             cmbCurrency.SelectedValue = Convert.ToInt64(dtQuotationItem.Rows[0]["CurrencyID"].ToString());
             lblExtraTax.Text          = dtQuotationItem.Rows[0]["ExtraTaxType"].ToString();
             CalculateNetAmount();
             cmbTaxClass_SelectedIndexChanged(sender, e);
         }
         LoadItemList();
     }
     else
     {
         cmbgodown.SelectedValue   = 1;
         cmbTaxClass.SelectedValue = 2;
         LoadItemList();
     }
 }
Exemplo n.º 6
0
        public void LoadList()
        {
            if (cmbTNCSub.SelectedIndex > 0)
            {
                if (dgvLOV.Rows.Count > 0)
                {
                    dgvLOV.DataSource = null;
                }
                //dtTNC = new DataTable();
                NameValueCollection para = new NameValueCollection();
                para.Add("@i_TNC_Sub", cmbTNCSub.Text);
                para.Add("@i_CompId", CurrentCompany.CompId.ToString());

                dtOTNC = objList.ListOfRecord("usp_TNC_LOV", para, "Terms And Conditions - Select");
                dtTNC  = objList.ListOfRecord("usp_TNC_LOV", para, "Terms And Conditions - Select");

                if (dtTNC.Rows.Count > 0)
                {
                    if (dtTNC.Rows.Count > 0)
                    {
                        dgvLOV.Columns["TNC_Desc"].DataPropertyName = dtTNC.Columns["TNC_Desc"].ToString();
                        dgvLOV.Columns["TNCID"].DataPropertyName    = dtTNC.Columns["TNCID"].ToString();
                    }
                }

                if (dtOTNC.Rows.Count > 0)
                {
                    if (dtOTNC.Rows.Count > 0)
                    {
                        dgvLOV.Columns["TNC_Desc"].DataPropertyName = dtOTNC.Columns["TNC_Desc"].ToString();
                        dgvLOV.Columns["TNCID"].DataPropertyName    = dtOTNC.Columns["TNCID"].ToString();
                    }
                }

                dgvLOV.AutoGenerateColumns = false;
                dgvLOV.DataSource          = dtTNC;

                dgvLOV.MultiSelect = true;

                if (dtQTNC.Rows.Count > 0)
                {
                    for (int i = 0; i < dtQTNC.Rows.Count; i++)
                    {
                        for (int j = 0; j < dgvLOV.RowCount; j++)
                        {
                            if (dtQTNC.Rows[i][1].ToString().Trim() == dgvLOV.Rows[j].Cells[1].Value.ToString().Trim())
                            {
                                dgvLOV.Rows[j].Cells[0].Value = true;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 7
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para = new NameValueCollection();

                para.Add("@i_FYID", CurrentUser.FYID.ToString());
                para.Add("@i_CompID", CurrentUser.CompId.ToString());
                para.Add("@i_UserID", CurrentUser.UserID.ToString());


                dtblPurchaseInvoice = objList.ListOfRecord("usp_PO_List", para, "PurchaseInvoice - LoadList");

                if (objList.Exception == null)
                {
                    if (dgvPurchaseInvoice.CurrentRow != null)
                    {
                        idgvPosition = dgvPurchaseInvoice.CurrentRow.Index;
                    }

                    valgrid = false;
                    ArrangeDataGridView();
                    dgvPurchaseInvoice.AutoGenerateColumns = false;
                    dgvPurchaseInvoice.DataSource          = dtblPurchaseInvoice;

                    lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvPurchaseInvoice.RowCount.ToString();
                    if (dgvPurchaseInvoice.CurrentRow != null && idgvPosition <= dgvPurchaseInvoice.RowCount)
                    {
                        if (dgvPurchaseInvoice.Rows.Count - 1 < idgvPosition)
                        {
                            dgvPurchaseInvoice.CurrentCell = dgvPurchaseInvoice.Rows[idgvPosition - 1].Cells[0];
                        }
                        else
                        {
                            dgvPurchaseInvoice.CurrentCell = dgvPurchaseInvoice.Rows[idgvPosition].Cells[0];
                        }
                    }
                    ArrangeDataGridView();
                    valgrid = true;
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("PurchaseInvoice", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 8
0
        private void cmbEmpName_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbEmpName.SelectedIndex > 0)
            {
                try
                {
                    DataTable           dtemailid = new DataTable();
                    long                empid     = Convert.ToInt64(cmbEmpName.SelectedValue);
                    NameValueCollection para      = new NameValueCollection();
                    para.Add("@i_EmpId", empid.ToString());
                    dtemailid = objList.ListOfRecord("usp_EmployeeEmail", para, "email");

                    if (dtemailid.Rows.Count > 0)
                    {
                        txtUserEmail.Text = dtemailid.Rows[0]["Email"].ToString();
                        txtNPassword.Text = "";
                    }
                }

                catch (Exception exc)
                {
                    Utill.Common.ExceptionLogger.writeException("Sales Invoice", exc.StackTrace);
                    MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
                }
            }
        }
Exemplo n.º 9
0
        private void LoadItemList()
        {
            try
            {
                //  _godown = Convert.ToInt32(cmbgodown.SelectedValue);
                NameValueCollection para = new NameValueCollection();
                para.Add("@i_GodownID", Convert.ToInt32(cmbgodown.SelectedValue).ToString());
                para.Add("@i_CompId", CurrentCompany.CompId.ToString());

                dtItemList = objList.ListOfRecord("usp_Item_AdjustItemLOV", para, "ItemAdjustment - LoadItemList");

                if (objList.Exception == null)
                {
                    txtItemName.AutoCompleteSource = AutoCompleteSource.CustomSource;
                    txtItemName.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                    AutoCompleteStringCollection Data = new AutoCompleteStringCollection();
                    for (int i = 0; i < dtItemList.Rows.Count; i++)
                    {
                        Data.Add(dtItemList.Rows[i]["ItemName"].ToString());
                    }
                    txtItemName.AutoCompleteCustomSource = Data;
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("ItemAdjustment", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 10
0
 private void LoadCustomerList()
 {
     try
     {
         dtblCustomer = objList.ListOfRecord("usp_Customer_LOV", null, "Customer Paymenting - LoadCustomerList");
         if (objList.Exception == null)
         {
             txtCustomerName.AutoCompleteSource = AutoCompleteSource.CustomSource;
             txtCustomerName.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
             AutoCompleteStringCollection Data = new AutoCompleteStringCollection();
             for (int i = 0; i < dtblCustomer.Rows.Count; i++)
             {
                 Data.Add(dtblCustomer.Rows[i]["CustomerName"].ToString());
             }
             txtCustomerName.AutoCompleteCustomSource = Data;
         }
         else
         {
             MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Customer Payment - Entry", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
Exemplo n.º 11
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para = new NameValueCollection();

                para.Add("@i_ContactType", _ContactType.ToString());
                para.Add("@i_RefID", _RefID.ToString());
                para.Add("@i_CompID", CurrentCompany.CompId.ToString());
                dtblContactPerson = objList.ListOfRecord("usp_ContactDetail_List", para, "ContactPerson - LoadList");

                if (objList.Exception == null)
                {
                    ArrangeDataGridView();
                    dgvContactPerson.AutoGenerateColumns = false;
                    dgvContactPerson.DataSource          = dtblContactPerson;

                    ArrangeDataGridView();
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("ContactPerson", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 12
0
        public void BindControl()
        {
            NameValueCollection para = new NameValueCollection();

            para.Add("@i_CompId", _CompId.ToString());
            dtUser = objList.ListOfRecord("usp_CompanyInfoDetail_Select", para, "CompanyInfo - Select");

            if (CommSelect.Exception == null)
            {
                if (CommSelect.ErrorMessage == "")
                {
                    if (dtUser.Rows.Count > 0)
                    {
                        txtCompanyName.Text   = dtUser.Rows[0]["CompanyName"].ToString();
                        txtBussinessLine.Text = dtUser.Rows[0]["BusinessLine"].ToString();
                        txtAddress1.Text      = dtUser.Rows[0]["Address1"].ToString();
                        txtAddress2.Text      = dtUser.Rows[0]["Address2"].ToString();
                        txtState.Text         = dtUser.Rows[0]["State"].ToString();
                        txtCity.Text          = dtUser.Rows[0]["CityName"].ToString();
                        txtPincode.Text       = dtUser.Rows[0]["Pincode"].ToString();
                        txtEmail.Text         = dtUser.Rows[0]["Email"].ToString();
                        txtPhone1.Text        = dtUser.Rows[0]["Phone1"].ToString();
                        txtPhone2.Text        = dtUser.Rows[0]["Phone2"].ToString();
                        txtMobile.Text        = dtUser.Rows[0]["Mobile"].ToString();
                        txtLogo.Text          = dtUser.Rows[0]["Logo"].ToString();
                        txtHeader.Text        = dtUser.Rows[0]["Header"].ToString();
                        txtFooter.Text        = dtUser.Rows[0]["Footer"].ToString();
                        txtSign.Text          = dtUser.Rows[0]["Sign"].ToString();
                        txtName1.Text         = dtUser.Rows[0]["Name1"].ToString();
                        txtName2.Text         = dtUser.Rows[0]["Name2"].ToString();
                        txtName3.Text         = dtUser.Rows[0]["Name3"].ToString();
                        txtName4.Text         = dtUser.Rows[0]["Name4"].ToString();
                        txtName5.Text         = dtUser.Rows[0]["Name5"].ToString();
                        txtName6.Text         = dtUser.Rows[0]["Name6"].ToString();
                        txtValue1.Text        = dtUser.Rows[0]["Value1"].ToString();
                        txtValue2.Text        = dtUser.Rows[0]["Value2"].ToString();
                        txtValue3.Text        = dtUser.Rows[0]["Value3"].ToString();
                        txtValue4.Text        = dtUser.Rows[0]["Value4"].ToString();
                        txtValue5.Text        = dtUser.Rows[0]["Value5"].ToString();
                        txtValue6.Text        = dtUser.Rows[0]["Value6"].ToString();
                        txtRPath.Text         = dtUser.Rows[0]["ReportPath"].ToString();
                        txtDPath.Text         = dtUser.Rows[0]["DocPath"].ToString();


                        txtCom_Profile.Text = dtUser.Rows[0]["Com_Profile"].ToString();
                        //txtRPath.Text = CurrentUser.ReportPath;
                        //txtDPath.Text = CurrentUser.DocumentPath;
                        txtEmail.CharacterCasing = CharacterCasing.Normal;
                    }
                }
                else
                {
                    MessageBox.Show(CommSelect.ErrorMessage);
                }
            }
            else
            {
                MessageBox.Show(CommSelect.Exception.Message.ToString());
            }
        }
Exemplo n.º 13
0
 private void frmPurchaseInvoiceItemEntry_Load(object sender, EventArgs e)
 {
     AddHandlers(this);
     SetControlsDefaults(this);
     objCommon.FillTaxClassCombo(cmbTaxClass);
     if (_Mode == (int)Constant.Mode.Modify)
     {
         DataTable           dtPurchaseItemEdit = new DataTable();
         NameValueCollection para = new NameValueCollection();
         para.Add("@i_PIID", _PIID.ToString());
         para.Add("@i_Item_Edit", _Item_Edit.ToString());
         dtPurchaseItemEdit = objList.ListOfRecord("usp_Purchase_Item_Edit", para, "Purchase-Edit");
         if (dtPurchaseItemEdit.Rows.Count > 0)
         {
             txtItemName.Text          = dtPurchaseItemEdit.Rows[0]["ItemName"].ToString();
             txtUOM.Text               = dtPurchaseItemEdit.Rows[0]["UOM"].ToString();
             txtRate.Text              = dtPurchaseItemEdit.Rows[0]["Rate"].ToString();
             txtQty.Text               = dtPurchaseItemEdit.Rows[0]["Qty"].ToString();
             txtQOH.Text               = dtPurchaseItemEdit.Rows[0]["QOH"].ToString();
             txtAmount.Text            = dtPurchaseItemEdit.Rows[0]["TotalAmount"].ToString();
             txtServiceTax.Text        = dtPurchaseItemEdit.Rows[0]["ServiceRate"].ToString();
             txtExciseRate.Text        = dtPurchaseItemEdit.Rows[0]["ExciseRate"].ToString();
             txtEduCessRate.Text       = dtPurchaseItemEdit.Rows[0]["ECessRate"].ToString();
             txtHEduCessRate.Text      = dtPurchaseItemEdit.Rows[0]["HECessRate"].ToString();
             txtCSTRate.Text           = dtPurchaseItemEdit.Rows[0]["CSTRate"].ToString();
             txtVATRate.Text           = dtPurchaseItemEdit.Rows[0]["VATRate"].ToString();
             txtAVATRate.Text          = dtPurchaseItemEdit.Rows[0]["AVATRate"].ToString();
             txtServiceAmt.Text        = dtPurchaseItemEdit.Rows[0]["ServiceAmount"].ToString();
             txtExciseAmt.Text         = dtPurchaseItemEdit.Rows[0]["ExciseAmount"].ToString();
             txtEduCessAmt.Text        = dtPurchaseItemEdit.Rows[0]["ECessAmount"].ToString();
             txtHEduCessAmt.Text       = dtPurchaseItemEdit.Rows[0]["HECessAmount"].ToString();
             txtAmtwithExcise.Text     = dtPurchaseItemEdit.Rows[0]["AmountAfterExcise"].ToString();
             txtCSTAmt.Text            = dtPurchaseItemEdit.Rows[0]["CSTAmount"].ToString();
             txtVATAmt.Text            = dtPurchaseItemEdit.Rows[0]["VATAmount"].ToString();
             txtAVATAmt.Text           = dtPurchaseItemEdit.Rows[0]["AVATAmount"].ToString();
             txtNetAmount.Text         = dtPurchaseItemEdit.Rows[0]["NetAmount"].ToString();
             dtpDDate.Value            = Convert.ToDateTime(dtPurchaseItemEdit.Rows[0]["DDate"]);
             cmbTaxClass.SelectedValue = dtPurchaseItemEdit.Rows[0]["TaxClassID"].ToString();
         }
     }
     else
     {
         cmbTaxClass.SelectedValue = 2;
         LoadItemList();
     }
 }
Exemplo n.º 14
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para1 = new NameValueCollection();
                _CompId = CurrentCompany.CompId;
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());

                para1.Add("@i_UserID", CurrentUser.UserID.ToString());

                ObjDataTable = objList.ListOfRecord("usp_VendorPaymentReturn_List", para1, "Customer Payment Return - List - LoadList");
                if (objList.Exception == null)
                {
                    if (dgvCustomerPayment.CurrentRow != null)
                    {
                        idgvPosition = dgvCustomerPayment.CurrentRow.Index;
                    }
                    ArrangeDataGridView();
                    dgvCustomerPayment.AutoGenerateColumns = false;
                    dgvCustomerPayment.DataSource          = ObjDataTable;
                    lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvCustomerPayment.RowCount.ToString();
                    if (dgvCustomerPayment.CurrentRow != null && idgvPosition <= dgvCustomerPayment.RowCount)
                    {
                        if (dgvCustomerPayment.Rows.Count - 1 < idgvPosition)
                        {
                            dgvCustomerPayment.CurrentCell = dgvCustomerPayment.Rows[idgvPosition - 1].Cells[0];
                        }
                        else
                        {
                            dgvCustomerPayment.CurrentCell = dgvCustomerPayment.Rows[idgvPosition].Cells[0];
                        }
                    }
                    ArrangeDataGridView();
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Customer Payment - List", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 15
0
        public void LoadCountryList()
        {
            try
            {
                NameValueCollection para = new NameValueCollection();
                para.Add("@i_UserID", CurrentUser.UserID.ToString());
                para.Add("@i_CompId", CurrentCompany.CompId.ToString());

                dtblCountry = CommList.ListOfRecord("usp_Country_List", para, "Location - LoadCountryList");
                if (CommList.Exception != null)
                {
                    MessageBox.Show(CommList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                if (dgvCountry.CurrentRow != null)
                {
                    idgvPositionCountry = dgvCountry.CurrentRow.Index;
                }

                valCountry = false;
                ArrangeCountryGridView();
                dgvCountry.AutoGenerateColumns = false;
                dgvCountry.DataSource          = dtblCountry;

                lblTotRecCountry.Text = Utill.Common.CommonMessage.TotalRecord + dgvCountry.RowCount.ToString();
                if (dgvCountry.CurrentRow != null && idgvPositionCountry <= dgvCountry.RowCount)
                {
                    if (dgvCountry.Rows.Count - 1 < idgvPositionCountry)
                    {
                        dgvCountry.CurrentCell = dgvCountry.Rows[idgvPositionCountry - 1].Cells[0];
                    }
                    else
                    {
                        dgvCountry.CurrentCell = dgvCountry.Rows[idgvPositionCountry].Cells[0];
                    }
                }

                ArrangeCountryGridView();
                valCountry = true;
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Country", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 16
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para = new NameValueCollection();
                para.Add("@i_UserID", CurrentUser.UserID.ToString());
                para.Add("@i_CompId", CurrentCompany.CompId.ToString());

                dtblItem = objList.ListOfRecord("usp_Item_List", para, "Item - LoadList");
                if (objList.Exception == null)
                {
                    if (dgvItemRegister.CurrentRow != null)
                    {
                        idgvPosition = dgvItemRegister.CurrentRow.Index;
                    }
                    ArrangeDataGridView();
                    dgvItemRegister.AutoGenerateColumns = false;
                    dgvItemRegister.DataSource          = dtblItem;
                    lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvItemRegister.RowCount.ToString();
                    if (dgvItemRegister.CurrentRow != null && idgvPosition <= dgvItemRegister.RowCount)
                    {
                        if (dgvItemRegister.Rows.Count - 1 < idgvPosition)
                        {
                            dgvItemRegister.CurrentCell = dgvItemRegister.Rows[idgvPosition - 1].Cells[1];
                        }
                        else
                        {
                            dgvItemRegister.CurrentCell = dgvItemRegister.Rows[idgvPosition].Cells[1];
                        }
                    }
                    ArrangeDataGridView();
                    dtblCustomer = objList.ListOfRecord("rpt_Sales_Service_Quotation", null, "Item - Report");
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Item Register", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 17
0
        private void frmGodownList_Load(object sender, EventArgs e)
        {
            AddHandlers(this);
            SetControlsDefaults(this);


            LoadList();



            if (Convert.ToInt16(_CompId) == 1)
            {
                btnNew.Enabled = true;
            }
            else
            {
                btnNew.Enabled = false;
            }

            DataTable dtCompCount = new DataTable();

            dtCompCount = objList.ListOfRecord("usp_CompanyCount", null, "Company-Count");

            if (Convert.ToInt16(dtCompCount.Rows[0]["Company"].ToString()) >= 3)
            {
                btnNew.Enabled = false;
            }
            dgvUsers_SelectionChanged(sender, e);

            if (CurrentUser.UserID != 1)
            {
                if (ConfigurationManager.AppSettings["URENABLE"].ToString() == "TRUE")
                {
                    if (CurrentUser.PrivilegeStr.IndexOf("#2002#") != -1)
                    {
                        btnEdit.Enabled = true;
                    }
                    else
                    {
                        btnEdit.Enabled = false;
                    }
                }
            }
        }
Exemplo n.º 18
0
 private void LoadList()
 {
     try
     {
         objDataAccess.Upload("Temp_Customer", _File_Path);
         dtblCustomer = objList.ListOfRecord("usp_Import_Customer_List", null, "Import Customer - LoadList");
         if (objList.Exception == null)
         {
             if (dgvCustomer.CurrentRow != null)
             {
                 idgvPosition = dgvCustomer.CurrentRow.Index;
             }
             ArrangeDataGridView();
             dgvCustomer.AutoGenerateColumns = false;
             dgvCustomer.DataSource          = dtblCustomer;
             lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvCustomer.RowCount.ToString();
             if (dgvCustomer.CurrentRow != null && idgvPosition <= dgvCustomer.RowCount)
             {
                 if (dgvCustomer.Rows.Count - 1 < idgvPosition)
                 {
                     dgvCustomer.CurrentCell = dgvCustomer.Rows[idgvPosition - 1].Cells[0];
                 }
                 else
                 {
                     dgvCustomer.CurrentCell = dgvCustomer.Rows[idgvPosition].Cells[0];
                 }
             }
             ArrangeDataGridView();
             dgvCustomer.ReadOnly = false;
         }
         else
         {
             MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Customer - LoadList", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
Exemplo n.º 19
0
 private void LoadList()
 {
     try
     {
         ObjDataTable = objList.ListOfRecord("usp_Quotation_List", null, "Quotation - List - LoadList");
         if (objList.Exception == null)
         {
             if (dgvSaleList.CurrentRow != null)
             {
                 idgvPosition = dgvSaleList.CurrentRow.Index;
             }
             ArrangeDataGridView();
             dgvSaleList.AutoGenerateColumns = false;
             dgvSaleList.DataSource          = ObjDataTable;
             lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvSaleList.RowCount.ToString();
             if (dgvSaleList.CurrentRow != null && idgvPosition <= dgvSaleList.RowCount)
             {
                 if (dgvSaleList.Rows.Count - 1 < idgvPosition)
                 {
                     dgvSaleList.CurrentCell = dgvSaleList.Rows[idgvPosition - 1].Cells[0];
                 }
                 else
                 {
                     dgvSaleList.CurrentCell = dgvSaleList.Rows[idgvPosition].Cells[0];
                 }
             }
             ArrangeDataGridView();
         }
         else
         {
             MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("Quotation -List", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
Exemplo n.º 20
0
 public void LoadList()
 {
     dtblLOV = CommList.ListOfRecord(_spName, _para, "ItemLOV - LoadList");
     if (CommList.Exception != null)
     {
         MessageBox.Show(CommList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         ArrangeDataGridView();
         dgvLOV.AutoGenerateColumns = false;
         dgvLOV.DataSource          = dtblLOV;
         ArrangeDataGridView();
     }
 }
Exemplo n.º 21
0
        public void  LoadList()
        {
            _CompId = CurrentCompany.CompId;
            para1.Add("@i_CompId", CurrentCompany.CompId.ToString());
            DataTable dtPromoLoad = new DataTable();

            dtPromoLoad = objList.ListOfRecord("usp_PromoMailLead_List", para1, "Promo Mail - Select");
            if (dtPromoLoad.Rows.Count > 0)
            {
                dgvLOV.Columns["CustomerName"].DataPropertyName = dtPromoLoad.Columns["CustomerName"].ToString();
                dgvLOV.Columns["Email"].DataPropertyName        = dtPromoLoad.Columns["Email"].ToString();
                dgvLOV.Columns["Mobile"].DataPropertyName       = dtPromoLoad.Columns["Mobile"].ToString();
                dgvLOV.Columns["Category"].DataPropertyName     = dtPromoLoad.Columns["Category"].ToString();
                dgvLOV.Columns["CompId"].DataPropertyName       = dtPromoLoad.Columns["CompId"].ToString();
            }
            dgvLOV.AutoGenerateColumns = false;
            dgvLOV.DataSource          = dtPromoLoad;
            dgvLOV.MultiSelect         = true;

            if (_Count == 1 || _dtPromoSend.Rows.Count > 0)
            {
                if (_dtPromoSend.Rows.Count > 0)
                {
                    for (int i = 0; i < _dtPromoSend.Rows.Count; i++)
                    {
                        for (int j = 0; j < dgvLOV.RowCount; j++)
                        {
                            if (_dtPromoSend.Rows[i]["Email"].ToString().Trim() == dtPromoLoad.Rows[j]["Email"].ToString().Trim() && _dtPromoSend.Rows[i]["CustomerName"].ToString().Trim() == dtPromoLoad.Rows[j]["CustomerName"].ToString().Trim() && _dtPromoSend.Rows[i]["Mobile"].ToString().Trim() == dtPromoLoad.Rows[j]["Mobile"].ToString().Trim() && _dtPromoSend.Rows[i]["Category"].ToString().Trim() == dtPromoLoad.Rows[j]["Category"].ToString().Trim())
                            {
                                dgvLOV.Rows[j].Cells[0].Value = true;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 22
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para1 = new NameValueCollection();
                _CompId = CurrentCompany.CompId;
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());
                para1.Add("@i_UserId", CurrentUser.UserID.ToString());


                dtblCustomer = objList.ListOfRecord("usp_Customer_ReceiptPendingList", para1, "Customer - ReceiptPendingList");
                if (objList.Exception == null)
                {
                    ArrangeDataGridView();
                    dgvContacts.AutoGenerateColumns = false;
                    dgvContacts.DataSource          = dtblCustomer;
                    ArrangeDataGridView();
                    if (dgvContacts.DataSource != null)
                    {
                        if (dgvContacts.Rows.Count > 0)
                        {
                            lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvContacts.RowCount.ToString();
                        }
                    }
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Contacts - LoadList", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 23
0
        private void LoadList()
        {
            try
            {
                NameValueCollection para = new NameValueCollection();

                para.Add("@i_AddressType", _AddressType.ToString());
                para.Add("@i_RefID", _RefID.ToString());

                dtblBillingAddress = objList.ListOfRecord("usp_AddressDetail_List", para, "BillingAddress - LoadList");

                if (objList.Exception == null)
                {
                    ArrangeDataGridView();
                    dgvBillingAddress.AutoGenerateColumns = false;
                    // dgvBillingAddress.DataSource = dtblBillingAddress;
                    for (int i = 0; i < dtblBillingAddress.Rows.Count; i++)
                    {
                        dgvBillingAddress.Rows.Add();
                    }

                    for (int i = 0; i < dtblBillingAddress.Rows.Count; i++)
                    {
                        dgvBillingAddress.Rows[i].Cells[0].Value = dtblBillingAddress.Rows[i]["Address1"].ToString();
                        dgvBillingAddress.Rows[i].Cells[1].Value = dtblBillingAddress.Rows[i]["Address2"].ToString();
                        dgvBillingAddress.Rows[i].Cells[2].Value = Convert.ToInt64(dtblBillingAddress.Rows[i]["CityID"].ToString());
                        dgvBillingAddress.Rows[i].Cells[3].Value = dtblBillingAddress.Rows[i]["Phone1"].ToString();
                        dgvBillingAddress.Rows[i].Cells[4].Value = dtblBillingAddress.Rows[i]["Phone2"].ToString();
                        dgvBillingAddress.Rows[i].Cells[5].Value = dtblBillingAddress.Rows[i]["Mobile"].ToString();
                        dgvBillingAddress.Rows[i].Cells[6].Value = dtblBillingAddress.Rows[i]["Fax"].ToString();
                        dgvBillingAddress.Rows[i].Cells[7].Value = dtblBillingAddress.Rows[i]["Pincode"].ToString();
                        dgvBillingAddress.EndEdit();
                    }


                    ArrangeDataGridView();
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("BillingAddress", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 24
0
        //private void frmGodownList_Load(object sender, EventArgs e)
        //{
        //    AddHandlers(this);
        //    SetControlsDefaults(this);
        //    LoadList();
        //    dgvUsers_SelectionChanged(sender, e);
        //}

        #endregion

        #region "Private Helper Methods"

        private void LoadList()
        {
            try
            {
                _isBind = false;

                NameValueCollection para1 = new NameValueCollection();
                _CompId = CurrentCompany.CompId;
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());

                para1.Add("@i_UserID", CurrentUser.UserID.ToString());


                dtblUser = objList.ListOfRecord("usp_Email_List", para1, "Email - LoadList");
                if (objList.Exception == null)
                {
                    if (dgvUsers.CurrentRow != null)
                    {
                        idgvPosition = dgvUsers.CurrentRow.Index;
                    }
                    dgvUsers.AutoGenerateColumns = false;
                    dgvUsers.DataSource          = dtblUser;
                    lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvUsers.RowCount.ToString();
                    if (dgvUsers.CurrentRow != null && idgvPosition <= dgvUsers.RowCount)
                    {
                        if (dgvUsers.Rows.Count - 1 < idgvPosition)
                        {
                            dgvUsers.CurrentCell = dgvUsers.Rows[idgvPosition - 1].Cells[1];
                        }
                        else
                        {
                            dgvUsers.CurrentCell = dgvUsers.Rows[idgvPosition].Cells[1];
                        }
                    }
                    ArrangeDataGridView();
                    _isBind = true;
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Email", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 25
0
        private void LoadList()
        {
            try
            {
                if (CurrentUser.UserID != 1)
                {
                    if (ConfigurationManager.AppSettings["URENABLE"].ToString() == "TRUE")
                    {
                        if (CurrentUser.PrivilegeStr.IndexOf("#5062#") != -1)
                        {
                            btnfollowup.Enabled = true;
                        }
                        else
                        {
                            btnfollowup.Enabled = false;
                        }
                    }
                }

                NameValueCollection para1 = new NameValueCollection();
                _CompId = CurrentCompany.CompId;
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());
                para1.Add("@i_UserId", CurrentUser.UserID.ToString());

                dtblPI = objList.ListOfRecord("usp_Invoice_List", para1, "Invoice - LoadList");
                if (objList.Exception == null)
                {
                    ArrangeDataGridView();
                    dgvInvoice.AutoGenerateColumns = false;
                    dgvInvoice.DataSource          = dtblPI;
                    ArrangeDataGridView();
                }



                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Invoice-LoadList", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 26
0
        private void LoadList()
        {
            try
            {
                dtblItem = objList.ListOfRecord("usp_Item_Rate_List", null, "ItemPriceList - LoadList");
                if (objList.Exception == null)
                {
                    if (dgvUpdateRatesList.CurrentRow != null)
                    {
                        idgvPosition = dgvUpdateRatesList.CurrentRow.Index;
                    }
                    ArrangeDataGridView();
                    dgvUpdateRatesList.AutoGenerateColumns = false;
                    dtblItem.DefaultView.RowFilter         = StrFilter;
                    DV           = dtblItem.DefaultView;
                    DV.RowFilter = StrFilter;
                    dtblItem     = DV.ToTable();

                    dgvUpdateRatesList.DataSource = dtblItem;
                    //dgvUpdateRatesList.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
                    lblTotRec.Text = Utill.Common.CommonMessage.TotalRecord + dgvUpdateRatesList.RowCount.ToString();
                    if (dgvUpdateRatesList.CurrentRow != null && idgvPosition <= dgvUpdateRatesList.RowCount)
                    {
                        if (dgvUpdateRatesList.Rows.Count - 1 < idgvPosition)
                        {
                            dgvUpdateRatesList.CurrentCell = dgvUpdateRatesList.Rows[idgvPosition - 1].Cells[0];
                        }
                        else
                        {
                            dgvUpdateRatesList.CurrentCell = dgvUpdateRatesList.Rows[idgvPosition].Cells[0];
                        }
                    }
                    ArrangeDataGridView();
                    ValGrid = true;
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Item Register", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 27
0
        public void LoadSIList()
        {
            try
            {
                NameValueCollection para    = new NameValueCollection();
                CommonListBL        objList = new CommonListBL();

                para.Add("@i_CustomerID", _CustomerID.ToString());

                dtblCustomerPaymentDetail = objList.ListOfRecord("usp_CustomerPayment_PendingSI_List", para, "Customer Payemnt- LoadSIList");
                if (objList.Exception == null)
                {
                    dgvCustomerPaymentDetail.AutoGenerateColumns = false;
                    dgvCustomerPaymentDetail.DataSource          = dtblCustomerPaymentDetail;

                    if (_Mode == (int)Common.Constant.Mode.Modify)
                    {
                        dgvCustomerPaymentDetail.Columns["Select"].DataPropertyName = dtblCustomerPaymentDetail.Columns["RecDetID"].ToString();
                    }
                    dgvCustomerPaymentDetail.Columns["PaidAmount"].DataPropertyName       = dtblCustomerPaymentDetail.Columns["PaidAmount"].ToString();
                    dgvCustomerPaymentDetail.Columns["PendingAmount"].DataPropertyName    = dtblCustomerPaymentDetail.Columns["PendingAmount"].ToString();
                    dgvCustomerPaymentDetail.Columns["SalesInvoice"].DataPropertyName     = dtblCustomerPaymentDetail.Columns["SalesCode"].ToString();
                    dgvCustomerPaymentDetail.Columns["SIID"].DataPropertyName             = dtblCustomerPaymentDetail.Columns["SIID"].ToString();
                    dgvCustomerPaymentDetail.Columns["SalesDate"].DataPropertyName        = dtblCustomerPaymentDetail.Columns["SalesDate"].ToString();
                    dgvCustomerPaymentDetail.Columns["ReminderDate"].DataPropertyName     = dtblCustomerPaymentDetail.Columns["ReminderDate"].ToString();
                    dgvCustomerPaymentDetail.Columns["SecurityDeposite"].DataPropertyName = dtblCustomerPaymentDetail.Columns["SecurityDeposite"].ToString();

                    for (int i = 0; i < dgvCustomerPaymentDetail.Columns.Count; i++)
                    {
                        dgvCustomerPaymentDetail.Columns[i].SortMode            = DataGridViewColumnSortMode.NotSortable;
                        dgvCustomerPaymentDetail.Columns["PaidAmount"].ReadOnly = true;
                    }
                }
                else
                {
                    MessageBox.Show(objList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("CustomerPayment - LoadSIList", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 28
0
        public void LoadList()
        {
            if (lblTNC.Text.Trim() != "")
            {
                if (dgvLOV.Rows.Count > 0)
                {
                    dgvLOV.DataSource = null;
                }
                DataTable           dtTNC = new DataTable();
                NameValueCollection para  = new NameValueCollection();
                para.Add("@i_TNC_Sub", lblTNC.Text);
                dtTNC = objList.ListOfRecord("usp_TNC_LOV", para, "Terms And Conditions - Select");
                if (dtTNC.Rows.Count > 0)
                {
                    dgvLOV.Columns["TNC_Desc"].DataPropertyName = dtTNC.Columns["TNC_Desc"].ToString();
                }

                dgvLOV.AutoGenerateColumns = false;
                dgvLOV.DataSource          = dtTNC;
                dgvLOV.MultiSelect         = true;

                if (dtQTNC.Rows.Count > 0)
                {
                    for (int i = 0; i < dtQTNC.Rows.Count; i++)
                    {
                        for (int j = 0; j < dgvLOV.RowCount; j++)
                        {
                            if (dtQTNC.Rows[i][1].ToString() == dgvLOV.Rows[j].Cells[1].Value.ToString())
                            {
                                dgvLOV.Rows[j].Cells[0].Value = true;
                            }
                        }
                    }
                }
                else
                {
                    foreach (DataGridViewRow row in dgvLOV.Rows)
                    {
                        row.Cells["Select"].Value = true;
                    }
                }
            }
        }
Exemplo n.º 29
0
        public void LoadList()
        {
            try
            {
                NameValueCollection para1 = new NameValueCollection();
                para1.Add("@i_UserID", CurrentUser.UserID.ToString());
                para1.Add("@i_CompId", CurrentCompany.CompId.ToString());

                dtblTaxClass = CommList.ListOfRecord("usp_TaxClass_List", para1, "Tax Class - LoadList");
                if (CommList.Exception != null)
                {
                    MessageBox.Show(CommList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                if (dgvTaxClass.CurrentRow != null)
                {
                    idgvPosition = dgvTaxClass.CurrentRow.Index;
                }
                ArrangeDataGridView();
                dgvTaxClass.AutoGenerateColumns = false;

                dgvTaxClass.DataSource = dtblTaxClass;
                lblTotRec.Text         = Utill.Common.CommonMessage.TotalRecord + dgvTaxClass.RowCount.ToString();

                if (dgvTaxClass.CurrentRow != null && idgvPosition <= dgvTaxClass.RowCount)
                {
                    if (dgvTaxClass.Rows.Count - 1 < idgvPosition)
                    {
                        dgvTaxClass.CurrentCell = dgvTaxClass.Rows[idgvPosition - 1].Cells[0];
                    }
                    else
                    {
                        dgvTaxClass.CurrentCell = dgvTaxClass.Rows[idgvPosition].Cells[0];
                    }
                }
                ArrangeDataGridView();
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("Tax Class", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }
Exemplo n.º 30
0
        public void FillAccountCombo(ComboBox cmb)
        {
            DataTable dtCity = new DataTable();

            dtCity = CommList.ListOfRecord("usp_Account_LOV", null, "Commission - FillAccountCombo");
            if (CommList.Exception != null)
            {
                MessageBox.Show(CommList.Exception.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                DataRow dr;
                dr = dtCity.NewRow();
                dr["AccountID"]   = 0;
                dr["AccountName"] = "--Select--";
                dtCity.Rows.InsertAt(dr, 0);
                cmb.DataSource    = dtCity;
                cmb.DisplayMember = "AccountName";
                cmb.ValueMember   = "AccountID";
            }
        }