Beispiel #1
0
        private void BtnSave_Click(object sender, EventArgs e)
        {
            HelpGridView.CloseEditor();
            HelpGridView.UpdateCurrentRow();
#pragma warning disable CS0618 // 'GridControl.KeyboardFocusView' is obsolete: 'Use the FocusedView property instead.'
            var MaxRow = ((HelpGrid.KeyboardFocusView as GridView).RowCount);
#pragma warning restore CS0618 // 'GridControl.KeyboardFocusView' is obsolete: 'Use the FocusedView property instead.'
            for (int i = 0; i < MaxRow; i++)
            {
                DataRow CurrentRow = HelpGridView.GetDataRow(i);
                if (CurrentRow["PassUnPass"].ToString().ToUpper() == "TRUE")
                {
                    string Query = "update  IndData Set ";
                    Query = Query + " IndPassTag='Y',IndPassDt='" + DateTime.Now.ToString("yyyy-MM-dd") + "',IndDItemQtyPass='******' Where IndID='" + CurrentRow["IndID"] + "'";

                    ProjectFunctions.GetDataSet(Query);
                }
                else
                {
                    DataSet dsCheck = ProjectFunctions.GetDataSet("Select * from POData Where POIndId='" + CurrentRow["IndID"] + "'");
                    if (dsCheck.Tables[0].Rows.Count > 0)
                    {
                        ProjectFunctions.SpeakError("Purchase Order Has Already Been Generated Against This Indent");
                    }
                    else
                    {
                        string Query = "update  IndData Set IndDItemQtyPass=0,";
                        Query = Query + " IndPassTag=null,IndPassDt=null Where IndID='" + CurrentRow["IndID"] + "'";

                        ProjectFunctions.GetDataSet(Query);
                    }
                }
            }
            Close();
        }
Beispiel #2
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtAccCode")
            {
                txtAccCode.Text  = row["AccCode"].ToString();
                txtAccName.Text  = row["AccName"].ToString();
                HelpGrid.Visible = false;
                txtAccCode.Focus();
            }
            if (HelpGrid.Text == "Load")
            {
                DataSet ds = ProjectFunctions.GetDataSet("sp_LoadEANData '" + row[0].ToString() + "'");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    AddRowsToDatatable();
                    dt = ds.Tables[0];
                    InfoGrid.DataSource = dt;
                    InfoGridView.BestFitColumns();
                    HelpGrid.Visible = false;
                }
                else
                {
                    InfoGrid.DataSource = null;
                }
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtCGSTPostingCode")
            {
                txtCGSTPostingCode.Text = row["AccCode"].ToString();
                txtCGSTPostingDesc.Text = row["AccName"].ToString();
                HelpGrid.Visible        = false;
                txtSGSTPostingCode.Focus();
            }
            if (HelpGrid.Text == "txtSGSTPostingCode")
            {
                txtSGSTPostingCode.Text = row["AccCode"].ToString();
                txtSGSTPostingDesc.Text = row["AccName"].ToString();
                HelpGrid.Visible        = false;
                txtIGSTPostingCode.Focus();
            }
            if (HelpGrid.Text == "txtIGSTPostingCode")
            {
                txtIGSTPostingCode.Text = row["AccCode"].ToString();
                txtIGSTPostingDesc.Text = row["AccName"].ToString();
                HelpGrid.Visible        = false;
                txtMessage.Focus();
            }
            if (HelpGrid.Text == "txtSalePostCode")
            {
                txtSalePostCode.Text = row["AccCode"].ToString();
                txtSalePostDesc.Text = row["AccName"].ToString();
                HelpGrid.Visible     = false;
                txtSalePostCode.Focus();
            }
        }
Beispiel #4
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            switch (HelpGrid.Text)
            {
            case "Advance":
                Txt_AdvVoucherNo.Text   = row["AdvVutNo"].ToString();
                DtAdvanceVuDt.EditValue = Convert.ToDateTime(row["AdvVutDate"]);
                Txt_AdvVoucherType.Text = row["AdvVutType"].ToString();
                Txt_AdvAmt.Text         = row["AdvVutAmt"].ToString();
                HelpGrid.Visible        = false;
                BtnRefreshGridData.Focus();
                break;

            case "Dealer":
                Txt_DealerCode.Text = row["DealerCode"].ToString();
                Txt_Dealer.Text     = row["DealerName"].ToString();

                Txt_AdvVoucherNo.Text   = string.Empty;
                Txt_AdvVoucherType.Text = string.Empty;
                Txt_AdvAmt.Text         = string.Empty;

                Txt_AdvVoucherNo.Focus();
                break;
            }
            HelpGrid.Visible = false;
            btnSave.Enabled  = false;
        }
Beispiel #5
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtCategoryCode")
            {
                txtCategoryCode.Text = row["CatgCode"].ToString();
                txtCategoryDesc.Text = row["CatgDesc"].ToString();
                HelpGrid.Visible     = false;
                txtDeptCode.Focus();
            }
            if (HelpGrid.Text == "txtDeptCode")
            {
                txtDeptCode.Text = row["DeptCode"].ToString();
                txtDeptDesc.Text = row["DeptDesc"].ToString();
                HelpGrid.Visible = false;
                txtDesgCode.Focus();
            }
            if (HelpGrid.Text == "txtDesgCode")
            {
                txtDesgCode.Text = row["DesgCode"].ToString();
                txtDesgDesc.Text = row["DesgDesc"].ToString();
                HelpGrid.Visible = false;
                txtUnitCode.Focus();
            }


            if (HelpGrid.Text == "txtUnitCode")
            {
                txtUnitCode.Text = row["UnitCode"].ToString();
                txtUnitDesc.Text = row["UnitName"].ToString();
                HelpGrid.Visible = false;
                txtDOJ.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow currentrow = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "SKU")
            {
                DataSet ds = ProjectFunctions.GetDataSet("sp_LoadSKUForPI '" + currentrow["SKUVOUCHNO"].ToString() + "' ,'" + currentrow["SKUFNYR"].ToString() + "'");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    dt = ds.Tables[0];
                    InfoGrid.DataSource = ds.Tables[0];
                    InfoGridView.BestFitColumns();
                    HelpGrid.Visible = false;
                }
                else
                {
                    InfoGrid.DataSource = null;
                    InfoGridView.BestFitColumns();
                }
            }
            if (HelpGrid.Text == "STORE")
            {
                txtStoreCode.Text = currentrow["AccDCCode"].ToString();
                HelpGrid.Visible  = false;
            }
        }
Beispiel #7
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtProductACode")
            {
                txtProductACode.Text = row["PrdAsgnCode"].ToString();
                txtProductCode.Text  = row["PrdCode"].ToString();
                txtProductName.Text  = row["PrdName"].ToString();
                HelpGrid.Visible     = false;
                txtProductQty.Focus();
            }
            if (HelpGrid.Text == "txtDebitPartyCode")
            {
                txtDebitPartyCode.Text = row["AccCode"].ToString();
                txtDebitPartyName.Text = row["AccName"].ToString();
                HelpGrid.Visible       = false;
                txtVatInvoice.Focus();
            }
            if (HelpGrid.Text == "txtVehicleCode")
            {
                txtVehicleCode.Text = row["VehicleCode"].ToString();
                txtVehicleDesc.Text = row["VehicleRegNo"].ToString();
                HelpGrid.Visible    = false;
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtPCode")
            {
                txtPCode.Text    = row["AccCode"].ToString().Trim();
                txtPDesc.Text    = row["AccName"].ToString().Trim();
                HelpGrid.Visible = false;
                txtTDSCode.Focus();
            }
            if (HelpGrid.Text == "txtPCode")
            {
                txtTDSCode.Text      = row["TdsCode"].ToString();
                txtTDSDesc.Text      = row["TdsDesc"].ToString();
                txtTDSRate.Text      = row["TdsRate"].ToString().Trim();
                txtTDSSurcharge.Text = row["TdsSRate"].ToString();
                txtUnderSection.Text = row["TdsUS"].ToString();
                if (txtTDSRate.Text == "0")
                {
                    txtTDSAmount.Enabled = true;
                    txtSurcOnTDS.Enabled = true;
                }
                else
                {
                    txtTDSAmount.Enabled = false;
                    txtSurcOnTDS.Enabled = false;
                }
                HelpGrid.Visible = false;
                txtOnAmount.Focus();
            }
        }
 private void HelpGrid_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);
         if (HelpGrid.Text == "txtMenuName")
         {
             txtMenuName.Text = row["Description"].ToString();
             HelpGrid.Visible = false;
             txtSMenuName.Focus();
         }
         if (HelpGrid.Text == "txtSMenuName")
         {
             txtSMenuName.Text = row["Description"].ToString();
             HelpGrid.Visible  = false;
             txtNfaTag.Focus();
         }
         if (HelpGrid.Text == "txtRoleCode")
         {
             txtRoleCode.Text = row["RoleCode"].ToString();
             txtRoleDesc.Text = row["RoleDesc"].ToString();
             HelpGrid.Visible = false;
             txtRoleCode.Focus();
         }
     }
     catch (Exception ex)
     {
         ProjectFunctions.SpeakError(ex.Message);
     }
 }
Beispiel #10
0
 private void HelpGrid_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);
         if (HelpGrid.Text == "txtGroupCode")
         {
             txtGroupCode.Text = row["AddressBookGroupCode"].ToString();
             txtGroupDesc.Text = row["AddressBookGroupDesc"].ToString();
             HelpGrid.Visible  = false;
             txtTitle.Focus();
         }
         if (HelpGrid.Text == "txtCityCode")
         {
             txtCityCode.Text = row["CTSYSID"].ToString();
             txtCityName.Text = row["CTNAME"].ToString();
             txtState.Text    = row["STNAME"].ToString();
             txtCountry.Text  = row["UNDERRG"].ToString();
             HelpGrid.Visible = false;
             txtCompany.Focus();
         }
     }
     catch (Exception ex)
     {
         ProjectFunctions.SpeakError(ex.Message);
     }
 }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow Row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            txtProductACode.Text = Row["PrdAsgnCode"].ToString();
            txtProductName.Text  = Row["PrdName"].ToString();
            txtProductCode.Text  = Row["PrdCode"].ToString();
            HelpGrid.Visible     = false;
            txtQty.Focus();
        }
Beispiel #12
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            HelpGridView.CloseEditor();
            HelpGridView.UpdateCurrentRow();
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtVoucherTypeCode")
            {
                txtVoucherTypeCode.Text = row["VouCode"].ToString();
                txtVoucherTypeDesc.Text = row["VouDesc"].ToString();
                HelpGrid.Visible        = false;
                panelControl2.Visible   = false;
                txtAccountCode.Focus();
            }
            if (HelpGrid.Text == "txtAccountCode")
            {
                txtAccountCode.Text   = row["AccCode"].ToString();
                txtAccountName.Text   = row["AccName"].ToString();
                HelpGrid.Visible      = false;
                panelControl2.Visible = false;
                txtShortNarration.Focus();
            }

            if (HelpGrid.Text == "AccCode")
            {
                if (HelpGridView.RowCount > 0)
                {
                    DataRow dtNewRow = dt.NewRow();
                    dtNewRow["AccCode"]   = row["AccCode"].ToString();
                    dtNewRow["AccName"]   = row["AccName"].ToString();
                    dtNewRow["Amount"]    = Convert.ToDecimal("0.00");
                    dtNewRow["Narration"] = string.Empty;
                    dtNewRow["CRDR"]      = SetCrDrValue();

                    dt.Rows.Add(dtNewRow);
                    if (dt.Rows.Count > 0)
                    {
                        VoucherGrid.DataSource = dt;
                        VoucherGridView.BestFitColumns();
                    }
                    else
                    {
                        VoucherGrid.DataSource = null;
                        VoucherGridView.BestFitColumns();
                    }
                    panelControl2.Visible = false;
                    VoucherGridView.Focus();
                    VoucherGridView.MoveLast();
                    VoucherGridView.FocusedColumn = VoucherGridView.Columns["Amount"];
                    VoucherGridView.ShowEditor();
                    txtSearchBox.Text = string.Empty;
                }
            }
        }
Beispiel #13
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtContractorCode")
            {
                txtContractorCode.Text = row["CNTSYSID"].ToString();
                txtContractorDesc.Text = row["CNTNAME"].ToString();
                HelpGrid.Visible       = false;
                txtWorkerName.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "EmpCode")
            {
                txtEmpCode.Text = row["EmpCode"].ToString();

                HelpGrid.Visible = false;
                btnLoad_Data.Focus();
            }
        }
Beispiel #15
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtDebitPartyCode")
            {
                txtDebitPartyCode.Text = row["AccCode"].ToString();
                txtDebitPartyName.Text = row["AccName"].ToString();
                HelpGrid.Visible       = false;
                txtDebitPartyCode.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtARTID")
            {
                txtARTID.Text    = row["ARTSYSID"].ToString();
                txtArtNo.Text    = row["ARTNO"].ToString();
                txtArtDesc.Text  = row["GrpSubDesc"].ToString();
                HelpGrid.Visible = false;
                txtARTID.Focus();
            }
        }
Beispiel #17
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            txtFabricCode.Text     = row["FabricCode"].ToString();
            txtFabricContent.Text  = row["FabricContent"].ToString();
            txtFabricTypeCode.Text = row["FabricTypeCode"].ToString();
            txtFabricTypeDesc.Text = row["FabricTypeName"].ToString();
            txtFabricLotNo.Text    = row["FabricLotNo"].ToString();
            txtColorCode.Text      = row["FabricColorID"].ToString();
            txtColorName.Text      = row["COLNAME"].ToString();
            HelpGrid.Visible       = false;
            txtQty.Focus();
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

                if (HelpGrid.Text == "txtTaxCodeL")
                {
                    txtTaxCodeL.Text     = row["TaxCode"].ToString();
                    txtTaxCodeLDesc.Text = row["TaxDesc"].ToString();
                    HelpGrid.Visible     = false;
                    txtTaxCodeC.Focus();
                }
                if (HelpGrid.Text == "txtTaxCodeC")
                {
                    txtTaxCodeC.Text     = row["TaxCode"].ToString();
                    txtTaxCodeCDesc.Text = row["TaxDesc"].ToString();
                    HelpGrid.Visible     = false;
                    txtTaxCodeC.Focus();
                }
                if (HelpGrid.Text == "txtUMCode")
                {
                    txtUMCode.Text   = row["UomCode"].ToString();
                    txtUMDesc.Text   = row["UomDesc"].ToString();
                    HelpGrid.Visible = false;
                    txtMRP.Focus();
                }
                if (HelpGrid.Text == "txtBrandCode")
                {
                    txtBrandCode.Text = row["BRSYSID"].ToString();
                    txtBrandDesc.Text = row["BRNAME"].ToString();
                    HelpGrid.Visible  = false;
                    txtUMCode.Focus();
                }
                if (HelpGrid.Text == "txtSGrpCode")
                {
                    txtSGrpCode.Text = row["GrpSubCode"].ToString();
                    txtSGrpDesc.Text = row["GrpSubDesc"].ToString();
                    txtGrpCode.Text  = row["GrpCode"].ToString();
                    txtGrpDesc.Text  = row["GrpDesc"].ToString();
                    txtHSNCode.Text  = row["GrpHSNCode"].ToString();
                    HelpGrid.Visible = false;
                    txtArtNo.Focus();
                }
            }
            catch (Exception ex)
            {
                ProjectFunctions.SpeakError(ex.Message);
            }
        }
Beispiel #19
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtCityCode")
            {
                txtCityCode.Text = row["CTSYSID"].ToString();
                txtCityName.Text = row["CTNAME"].ToString();
                txtState.Text    = row["STNAME"].ToString();
                txtCountry.Text  = row["UNDERRG"].ToString();
                HelpGrid.Visible = false;
                txtContactPerson.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow currentrow = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            FormReports.FrmPivotGridReports PROG109 = new FormReports.FrmPivotGridReports()
            {
                Dock = DockStyle.Fill, TopLevel = false
            };
            PROG109.LayoutName       = currentrow["LayoutName"].ToString();
            GlobalVariables.ProgCode = currentrow["ProgCode"].ToString();
            _WorkAreaPanel.Controls.Add(PROG109);
            PROG109.Show();
            PROG109.BringToFront();
            HelpGrid.Visible = false;
        }
Beispiel #21
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);
                //if (HelpGrid.Text == "txtStateCode")
                //{
                //    txtStateCode.Text = row["STSYSID"].ToString();
                //    txtStateName.Text = row["STNAME"].ToString();
                //    HelpGrid.Visible = false;
                //    txtCityCode.Focus();
                //}


                //if (HelpGrid.Text == "txtCityCode")
                //{
                //    txtCityCode.Text = row["CTSYSID"].ToString();
                //    txtCityName.Text = row["CTNAME"].ToString();
                //    txtState.Text = row["STNAME"].ToString();

                //    HelpGrid.Visible = false;

                //}

                if (HelpGrid.Text == "txtCityCode")
                {
                    txtCityCode.Text = row["CTSYSID"].ToString();
                    txtCityName.Text = row["CTNAME"].ToString();
                    txtState.Text    = row["STNAME"].ToString();
                    // txtCountry.Text = row["UNDERRG"].ToString();
                    HelpGrid.Visible = false;
                    //txtContactPerson.Focus();
                }
                if (HelpGrid.Text == "txtAccCode")
                {
                    txtAccCode.Text  = row["AccCode"].ToString();
                    txtAccName.Text  = row["AccName"].ToString();
                    HelpGrid.Visible = false;
                    txtGSTNo.Focus();
                }
            }
            catch (Exception ex)
            {
                ProjectFunctions.SpeakError(ex.Message);
            }
        }
Beispiel #22
0
 private void HelpGrid_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);
         if (HelpGrid.Text == "txtStateCode")
         {
             txtStateCode.Text = row["STSYSID"].ToString();
             txtStateName.Text = row["STNAME"].ToString();
             HelpGrid.Visible  = false;
             txtStateCode.Focus();
         }
     }
     catch (Exception ex)
     {
         ProjectFunctions.SpeakError(ex.Message);
     }
 }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "EmpCode")
            {
                txtEmpCode.Text = row["EmpCode"].ToString();
                txtEmpName.Text = row["EmpName"].ToString();
                lblemp.Text     = row["EmpName"].ToString();
                //txtDept.Text = row["DeptDesc"].ToString();
                HelpGrid.Visible = false;
                BtnLoad_Data_Click(sender, e);

                //btnLoad_Data.Focus();

                //LastInstlmnt();
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
#pragma warning disable CS0618 // 'GridControl.KeyboardFocusView' is obsolete: 'Use the FocusedView property instead.'
            var MaxRow = ((HelpGrid.KeyboardFocusView as GridView).RowCount);
#pragma warning restore CS0618 // 'GridControl.KeyboardFocusView' is obsolete: 'Use the FocusedView property instead.'
            ProjectFunctions.GetDataSet("Delete From DealerRateMaster Where DrDealerCode='" + DealerCode + "'");
            for (int i = 0; i < MaxRow; i++)
            {
                DataRow CurrentRow = HelpGridView.GetDataRow(i);
                String  Query      = "Insert Into DealerRateMaster(drPrdcode,drDealerCode,drPrdRate,drPrdRDC,drPrdRDC1)values(";
                Query = Query + "'" + Convert.ToDecimal(CurrentRow["PrdCode"]) + "',";
                Query = Query + "'" + DealerCode + "',";
                Query = Query + "'" + Convert.ToDecimal(CurrentRow["Rate"]) + "',";
                Query = Query + "'" + Convert.ToDecimal(CurrentRow["Disc"]) + "',";
                Query = Query + "'" + Convert.ToDecimal(CurrentRow["DiscO"]) + "')";
                ProjectFunctions.GetDataSet(Query);
            }
            this.Close();
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtVuType")
            {
                txtVuType.Text   = row["VouCode"].ToString();
                txtVuDesc.Text   = row["VouDesc"].ToString();
                HelpGrid.Visible = false;
                txtAccCode.Focus();
            }
            if (HelpGrid.Text == "txtAccCode")
            {
                txtAccCode.Text  = row["AccCode"].ToString();
                txtAccName.Text  = row["AccName"].ToString();
                HelpGrid.Visible = false;
                txtAmount.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtAgainstInvNo")
            {
                txtAgainstInvNo.Text   = row["ImNo"].ToString();
                txtAgainstInvDate.Text = row["ImDate"].ToString();


                DataSet ds = ProjectFunctions.GetDataSet("SELECT     InvoiceMst.ImSalesManCode, ActMst.AccName AS SalesManName, InvoiceMst.ImPartyCode, ActMst_1.AccName  as PartyName ,  InvoiceMst.ImRouteCode, RouteMst.RouteDesc, InvoiceMst.ImLC, InvoiceMst.ImInvTypeHead, InvoiceMst.ImDealerCode, dealerMaster.dealerName, InvoiceMst.ImCForm FROM         InvoiceMst INNER JOIN ActMst ON InvoiceMst.ImSalesManCode = ActMst.AccCode INNER JOIN ActMst AS ActMst_1 ON InvoiceMst.ImPartyCode = ActMst_1.AccCode INNER JOIN  RouteMst ON InvoiceMst.ImRouteCode = RouteMst.RouteCode INNER JOIN dealerMaster ON InvoiceMst.ImDealerCode = dealerMaster.dealerCode");
                if (ds.Tables[0].Rows.Count > 0)
                {
                    txtSmCode.Text         = ds.Tables[0].Rows[0]["ImSalesManCode"].ToString();
                    txtSMName.Text         = ds.Tables[0].Rows[0]["SalesManName"].ToString();
                    txtDebitPartyCode.Text = ds.Tables[0].Rows[0]["ImPartyCode"].ToString();
                    txtDebitPartyName.Text = ds.Tables[0].Rows[0]["PartyName"].ToString();
                    txtRouteCode.Text      = ds.Tables[0].Rows[0]["ImRouteCode"].ToString();
                    txtRouteName.Text      = ds.Tables[0].Rows[0]["RouteDesc"].ToString();
                    txtLCTag.Text          = ds.Tables[0].Rows[0]["ImLC"].ToString();
                    txtInvoiceType.Text    = ds.Tables[0].Rows[0]["ImInvTypeHead"].ToString();
                    txtDealerCode.Text     = ds.Tables[0].Rows[0]["ImDealerCode"].ToString();
                    txtDealerName.Text     = ds.Tables[0].Rows[0]["dealerName"].ToString();
                    txtCForm.Text          = ds.Tables[0].Rows[0]["ImCForm"].ToString();
                }

                HelpGrid.Visible = false;
                txtProductACode.Focus();
            }

            if (HelpGrid.Text == "txtProductACode")
            {
                txtProductACode.Text = row["PrdAsgnCode"].ToString();
                txtProductCode.Text  = row["IdPrdCode"].ToString();
                txtProductName.Text  = row["PrdName"].ToString();
                txtProductRate.Text  = row["IdPrdRate"].ToString();
                txtRdc.Text          = row["IdDiscRate"].ToString();
                txtSchmQty.Text      = row["IdSchmQty"].ToString();
                txtSchmQtyF.Text     = row["IdSchmQtyF"].ToString();
                HelpGrid.Visible     = false;
                txtProductQty.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtTypeCode")
            {
                txtTypeCode.Text = row["TypeCode"].ToString();
                txtTypeDesc.Text = row["TypeDesc"].ToString();
                HelpGrid.Visible = false;
                txtBrandCode.Focus();
            }
            if (HelpGrid.Text == "txtBrandCode")
            {
                txtBrandCode.Text = row["BrandCode"].ToString();
                txtBrandDesc.Text = row["BrandDesc"].ToString();
                HelpGrid.Visible  = false;
                txtGauge.Focus();
            }
        }
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtYarnTypeCode")
            {
                txtYarnTypeCode.Text = row["YarnTypeCode"].ToString();
                txtYarnTypeDesc.Text = row["YarnTypeName"].ToString();
                HelpGrid.Visible     = false;
                txtYarnContent.Focus();
            }
            if (HelpGrid.Text == "txtColorCode")
            {
                txtColorCode.Text = row["COLSYSID"].ToString();
                txtColorName.Text = row["COLNAME"].ToString();
                HelpGrid.Visible  = false;
                txtColorCode.Focus();
            }
        }
Beispiel #29
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            DataRow currentrow = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "txtArtNo")
            {
                txtArtNo.Text   = currentrow["ARTNO"].ToString();
                txtArtID.Text   = currentrow["ARTSYSID"].ToString();
                txtArtDesc.Text = currentrow["GrpSubDesc"].ToString();
                LoadProductionOrderColorAndSize();
                HelpGrid.Visible = false;
                txtSampleWeight.Focus();
            }
            if (HelpGrid.Text == "txtBrandCode")
            {
                txtBrandCode.Text = currentrow["BRSYSID"].ToString();
                txtBrandName.Text = currentrow["BRNAME"].ToString();
                txtSampleSize.Focus();
            }
        }
Beispiel #30
0
        private void HelpGrid_DoubleClick(object sender, EventArgs e)
        {
            var row = HelpGridView.GetDataRow(HelpGridView.FocusedRowHandle);

            if (HelpGrid.Text == "Emp")
            {
                txtEmpCode.Text     = row["Code"].ToString().Trim();
                txtEmpCodeDesc.Text = row["Description"].ToString().Trim();
                HelpGrid.Visible    = false;
                GetBasicDetail();
                txtType.Focus();
            }
            //if (HelpGrid.Text == "ERMCode")
            //{
            //    txtContCode.Text = row["ERMCode"].ToString().Trim();
            //    txtContCodeDesc.Text = row["ERMDesc"].ToString().Trim();
            //    HelpGrid.Visible = false;
            //    txtEmpCode.Focus();
            //}
        }