Example #1
0
 /// <summary>
 /// Calls corresponding Ledgers AccountGroupwise Report on cell double click in Datagridview
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvProfitAndLoss_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (dgvProfitAndLoss.CurrentRow.Index != -1 && dgvProfitAndLoss.CurrentCell.ColumnIndex != -1)
         {
             if (dgvProfitAndLoss.CurrentCell != null)
             {
                 if (dgvProfitAndLoss.CurrentCell.Value != null && dgvProfitAndLoss.CurrentCell.Value.ToString().Trim() != string.Empty)
                 {
                     int    inRowIndex = dgvProfitAndLoss.CurrentCell.RowIndex;
                     int    inColIndex = dgvProfitAndLoss.CurrentCell.ColumnIndex;
                     string strGroupId = string.Empty;
                     if (dgvProfitAndLoss.Columns[inColIndex].Name == "dgvtxtExpenses" || dgvProfitAndLoss.Columns[inColIndex].Name == "dgvtxtAmount1")
                     {
                         try
                         {
                             if (dgvProfitAndLoss.Rows[inRowIndex].Cells["dgvtxtGroupId1"].Value != null && dgvProfitAndLoss.Rows[inRowIndex].Cells["dgvtxtGroupId1"].Value.ToString() != string.Empty)
                             {
                                 strGroupId = dgvProfitAndLoss.Rows[inRowIndex].Cells["dgvtxtGroupId1"].Value.ToString();
                             }
                         }
                         catch
                         {
                             strGroupId = string.Empty;
                         }
                     }
                     else if (dgvProfitAndLoss.Columns[inColIndex].Name == "dgvtxtIncome" || dgvProfitAndLoss.Columns[inColIndex].Name == "dgvtxtAmount2")
                     {
                         try
                         {
                             if (dgvProfitAndLoss.Rows[inRowIndex].Cells["dgvtxtGroupId2"].Value != null && dgvProfitAndLoss.Rows[inRowIndex].Cells["dgvtxtGroupId2"].Value.ToString() != string.Empty)
                             {
                                 strGroupId = dgvProfitAndLoss.Rows[inRowIndex].Cells["dgvtxtGroupId2"].Value.ToString();
                             }
                         }
                         catch
                         {
                             strGroupId = string.Empty;
                         }
                     }
                     if (strGroupId != string.Empty)
                     {
                         inCurrenRowIndex    = inRowIndex;
                         inCurrentColunIndex = inColIndex;
                         frmAccountGroupwiseReport objForm = new frmAccountGroupwiseReport();
                         objForm.WindowState = FormWindowState.Normal;
                         objForm.MdiParent   = formMDI.MDIObj;
                         objForm.CallFromProfitAndLoss(txtFromDate.Text, txtToDate.Text, strGroupId, this);
                         this.Enabled = false;
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PAL9:" + ex.Message;
     }
 }
Example #2
0
 /// <summary>
 /// Calls Corresponding Ledgers AccountGroupWiseReprt to view Details
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvFundFlow_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (dgvFundFlow.CurrentRow.Index == e.RowIndex)
         {
             if (dgvFundFlow.CurrentCell != null)
             {
                 if (dgvFundFlow.CurrentCell.Value != null && dgvFundFlow.CurrentCell.Value.ToString().Trim() != string.Empty)
                 {
                     int    inRowIndex = dgvFundFlow.CurrentCell.RowIndex;
                     int    inColIndex = dgvFundFlow.CurrentCell.ColumnIndex;
                     string strGroupId = string.Empty;
                     if (dgvFundFlow.Columns[inColIndex].Name == "dgvtxtSource" || dgvFundFlow.Columns[inColIndex].Name == "dgvtxtAmount1")
                     {
                         if (Convert.ToString(dgvFundFlow.Rows[e.RowIndex].Cells["dgvtxtAmount1"].Value) != "_______________________")
                         {
                             if (Convert.ToDecimal(dgvFundFlow.Rows[e.RowIndex].Cells["dgvtxtAmount1"].Value.ToString()) != 0)
                             {
                                 if (dgvFundFlow.Rows[inRowIndex].Cells["dgvtxtgroupId1"].Value != null && dgvFundFlow.Rows[inRowIndex].Cells["dgvtxtgroupId1"].Value.ToString() != string.Empty)
                                 {
                                     strGroupId = dgvFundFlow.Rows[inRowIndex].Cells["dgvtxtgroupId1"].Value.ToString();
                                 }
                             }
                         }
                     }
                     else if (dgvFundFlow.Columns[inColIndex].Name == "dgvtxtApplication" || dgvFundFlow.Columns[inColIndex].Name == "dgvtxtAmount2")
                     {
                         if (Convert.ToString(dgvFundFlow.Rows[e.RowIndex].Cells["dgvtxtAmount2"].Value) != "________________________")
                         {
                             if (Convert.ToDecimal(dgvFundFlow.Rows[e.RowIndex].Cells["dgvtxtAmount2"].Value.ToString()) != 0)
                             {
                                 if (dgvFundFlow.Rows[inRowIndex].Cells["dgvtxtgroupId2"].Value != null && dgvFundFlow.Rows[inRowIndex].Cells["dgvtxtgroupId2"].Value.ToString() != string.Empty)
                                 {
                                     strGroupId = dgvFundFlow.Rows[inRowIndex].Cells["dgvtxtgroupId2"].Value.ToString();
                                 }
                             }
                         }
                     }
                     if (strGroupId != string.Empty)
                     {
                         inCurrenRowIndex = inRowIndex;
                         frmAccountGroupwiseReport objForm1 = new frmAccountGroupwiseReport();
                         objForm1.WindowState = FormWindowState.Normal;
                         objForm1.MdiParent   = formMDI.MDIObj;
                         objForm1.CallFromFundFlow(txtFundFlowFromDate.Text, txtFundflowToDate.Text, strGroupId, this);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "FF11:" + ex.Message;
     }
 }
Example #3
0
 /// <summary>
 /// Calls Corresponding Ledgers AccountGroupWiseReprt to view Details
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvFundFlow2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (dgvFundFlow2.CurrentRow.Index == e.RowIndex)
         {
             if (dgvFundFlow2.CurrentCell != null)
             {
                 if (dgvFundFlow2.CurrentCell.Value != null && dgvFundFlow2.CurrentCell.Value.ToString().Trim() != string.Empty)
                 {
                     int    inRowIndex = dgvFundFlow2.CurrentCell.RowIndex;
                     int    inColIndex = dgvFundFlow2.CurrentCell.ColumnIndex;
                     string strGroupId = string.Empty;
                     if (dgvFundFlow2.Columns[inColIndex].Name == "dgvtxtParticulars" || dgvFundFlow2.Columns[inColIndex].Name == "dgvtxtOpeningBalance" || dgvFundFlow2.Columns[inColIndex].Name == "dgvtxtClosingBalance")
                     {
                         if (Convert.ToDecimal(dgvFundFlow2.Rows[e.RowIndex].Cells["dgvtxtop"].Value) != 0 || Convert.ToDecimal(dgvFundFlow2.Rows[e.RowIndex].Cells["dgvtxtcb"].Value) != 0)
                         {
                             try
                             {
                                 if (dgvFundFlow2.Rows[inRowIndex].Cells["dgvtxtgroupId"].Value != null && dgvFundFlow2.Rows[inRowIndex].Cells["dgvtxtgroupId"].Value.ToString() != string.Empty)
                                 {
                                     strGroupId = dgvFundFlow2.Rows[inRowIndex].Cells["dgvtxtgroupId"].Value.ToString();
                                 }
                             }
                             catch
                             {
                                 strGroupId = string.Empty;
                             }
                         }
                     }
                     if (strGroupId != string.Empty)
                     {
                         inCurrenRowIndex = inRowIndex;
                         frmAccountGroupwiseReport objForm1 = new frmAccountGroupwiseReport();
                         objForm1.WindowState = FormWindowState.Normal;
                         objForm1.MdiParent   = formMDI.MDIObj;
                         if (strGroupId == "6")
                         {
                             objForm1.CallFromFundFlow(txtFundFlowFromDate.Text, txtFundflowToDate.Text, strGroupId, this, dcClosingStock);
                         }
                         else
                         {
                             objForm1.CallFromFundFlow(txtFundFlowFromDate.Text, txtFundflowToDate.Text, strGroupId, this);
                         }
                         this.Enabled = false;
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "FF12:" + ex.Message;
     }
 }
Example #4
0
 /// <summary>
 /// Function to call this form from frmAccountGroupwiseReport
 /// </summary>
 /// <param name="AccountGroupWise"></param>
 /// <param name="decLedgerId"></param>
 /// <param name="fromDate"></param>
 /// <param name="toDate"></param>
 public void CallFromAccountGroupWiseReport(frmAccountGroupwiseReport AccountGroupWise, decimal decLedgerId, DateTime fromDate, DateTime toDate)
 {
     try
     {
         frmAccountGroupwiseReportObj         = AccountGroupWise;
         frmAccountGroupwiseReportObj.Enabled = false;
         decLedgerIdForGridFill = decLedgerId;
         txtFromDate.Text       = fromDate.ToString("dd-MMM-yyyy");
         txtToDate.Text         = toDate.ToString("dd-MMM-yyyy");
         base.Show();
         LedgerDetailsView();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "LEDDET6:" + ex.Message;
     }
 }
Example #5
0
 /// <summary>
 /// When doubleclicking on the grid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvAccountGroupReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (dgvAccountGroupReport.CurrentRow.Index == e.RowIndex)
         {
             decimal decAccountGroupId = Convert.ToDecimal(dgvAccountGroupReport.Rows[e.RowIndex].Cells["dgvtxtAccountGroupId"].Value.ToString());
             frmAccountGroupwiseReport frmAccountGroupwiseReportObj = new frmAccountGroupwiseReport();
             frmAccountGroupwiseReportObj.MdiParent = formMDI.MDIObj;
             frmAccountGroupwiseReportObj.CallFromAccountGroupReport(this, decAccountGroupId, txtFromDate.Text, txtToDate.Text);
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "AGR12:" + ex.Message;
     }
 }
Example #6
0
 /// <summary>
 /// When doubleclicking on the grid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvCashOrBank_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex > -1)
         {
             if (dgvCashOrBank.CurrentRow.Index == e.RowIndex)
             {
                 decimal decAccountGroupId = Convert.ToDecimal(dgvCashOrBank.Rows[e.RowIndex].Cells["dgvtxtGroupId"].Value.ToString());
                 frmAccountGroupwiseReport frmAccountGroupwiseReportObjt = new frmAccountGroupwiseReport();
                 frmAccountGroupwiseReportObjt.MdiParent = formMDI.MDIObj;
                 frmAccountGroupwiseReportObjt.CallFromCashBankBook(dtpFromDate.Value.ToString(), dtpToDate.Value.ToString(), decAccountGroupId, this);
                 this.Enabled = false;
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "CBBOOK8:" + ex.Message;
     }
 }
Example #7
0
        /// <summary>
        /// Shows details of corresponding Ledgers on Cell double click in Datagirdview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvReport_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (dgvReport.CurrentRow.Index == e.RowIndex)
                {
                    if (dgvReport.CurrentCell != null)
                    {
                        if (dgvReport.CurrentCell.Value != null && dgvReport.CurrentCell.Value.ToString().Trim() != string.Empty)
                        {
                            int    inRowIndex  = dgvReport.CurrentCell.RowIndex;
                            int    inColIndex  = dgvReport.CurrentCell.ColumnIndex;
                            string strGroupId  = string.Empty;
                            string strLedgerId = string.Empty;
                            if (dgvReport.Columns[inColIndex].Name == "dgvtxtAsset" || dgvReport.Columns[inColIndex].Name == "Amount1")
                            {
                                try
                                {
                                    if (Convert.ToDecimal(dgvReport.Rows[e.RowIndex].Cells["Amount1"].Value.ToString()) != 0)
                                    {
                                        if (dgvReport.Rows[inRowIndex].Cells["ID1"].Value != null && dgvReport.Rows[inRowIndex].Cells["ID1"].Value.ToString() != string.Empty)
                                        {
                                            strLedgerId = dgvReport.Rows[inRowIndex].Cells["ID1"].Value.ToString();
                                            strGroupId  = string.Empty;
                                        }
                                        else if (dgvReport.Rows[inRowIndex].Cells["GroupId1"].Value != null && dgvReport.Rows[inRowIndex].Cells["GroupId1"].Value.ToString() != string.Empty)
                                        {
                                            strGroupId  = dgvReport.Rows[inRowIndex].Cells["GroupId1"].Value.ToString();
                                            strLedgerId = string.Empty;
                                        }
                                    }
                                }
                                catch
                                {
                                    strGroupId  = string.Empty;
                                    strLedgerId = string.Empty;
                                }
                            }
                            else if (dgvReport.Columns[inColIndex].Name == "dgvtxtLiability" || dgvReport.Columns[inColIndex].Name == "Amount2")
                            {
                                try
                                {
                                    if (Convert.ToDecimal(dgvReport.Rows[e.RowIndex].Cells["Amount2"].Value.ToString()) != 0)
                                    {
                                        if (dgvReport.Rows[inRowIndex].Cells["ID2"].Value != null && dgvReport.Rows[inRowIndex].Cells["ID2"].Value.ToString() != string.Empty)
                                        {
                                            strLedgerId = dgvReport.Rows[inRowIndex].Cells["ID2"].Value.ToString();
                                            strGroupId  = string.Empty;
                                        }
                                        else if (dgvReport.Rows[inRowIndex].Cells["GroupId2"].Value != null && dgvReport.Rows[inRowIndex].Cells["GroupId2"].Value.ToString() != string.Empty)
                                        {
                                            strGroupId  = dgvReport.Rows[inRowIndex].Cells["GroupId2"].Value.ToString();
                                            strLedgerId = string.Empty;
                                        }
                                    }
                                }
                                catch
                                {
                                    strGroupId  = string.Empty;
                                    strLedgerId = string.Empty;
                                }
                            }
                            if (strLedgerId != string.Empty || strGroupId != string.Empty)
                            {
                                inCurrenRowIndex = inRowIndex;
                                frmAccountGroupwiseReport objForm1 = new frmAccountGroupwiseReport();
                                objForm1.WindowState = FormWindowState.Normal;
                                objForm1.MdiParent   = formMDI.MDIObj;
                                objForm1.CallFromBalancesheet(dtfromdate.ToString(), txtToDate.Text, strGroupId, this);
                                this.Enabled = false;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.Enabled = true;

                formMDI.infoError.ErrorString = "BS9:" + ex.Message;
            }
        }
Example #8
0
        /// <summary>
        /// Calls AccountGroupwiseReport to view details on cell double click in Datagridview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvCashflow_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (dgvCashflow.CurrentRow.Index == e.RowIndex)
                {
                    if (dgvCashflow.CurrentRow.Index != -1 && dgvCashflow.CurrentCell.ColumnIndex != 0)
                    {
                        if (dgvCashflow.CurrentCell != null)
                        {
                            if (dgvCashflow.CurrentCell.Value != null && dgvCashflow.CurrentCell.Value.ToString().Trim() != string.Empty)
                            {
                                int    inRowIndex = dgvCashflow.CurrentCell.RowIndex;
                                int    inColIndex = dgvCashflow.CurrentCell.ColumnIndex;
                                string strGroupId = string.Empty;
                                if (dgvCashflow.Columns[inColIndex].Name == "dgvtxtParticulars" || dgvCashflow.Columns[inColIndex].Name == "dgvtxtinflow")
                                {
                                    if (Convert.ToString(dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtinflow"].Value) != "_______________________")
                                    {
                                        if (Convert.ToDecimal(dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtinflow"].Value.ToString()) != 0)
                                        {
                                            try
                                            {
                                                if (dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtID1"].Value != null && dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtID1"].Value.ToString() != string.Empty)
                                                {
                                                    strGroupId = dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtID1"].Value.ToString();
                                                }
                                            }
                                            catch
                                            {
                                                strGroupId = string.Empty;
                                            }
                                        }
                                    }
                                }
                                else if (dgvCashflow.Columns[inColIndex].Name == "dgvtxtParticulars1" || dgvCashflow.Columns[inColIndex].Name == "dgvtxtoutflow")
                                {
                                    if (Convert.ToString(dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtoutflow"].Value) != "_______________________")
                                    {
                                        if (Convert.ToDecimal(dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtoutflow"].Value.ToString()) != 0)
                                        {
                                            try
                                            {
                                                if (dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtID2"].Value != null && dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtID2"].Value.ToString() != string.Empty)
                                                {
                                                    strGroupId = dgvCashflow.Rows[e.RowIndex].Cells["dgvtxtID2"].Value.ToString();
                                                }
                                            }
                                            catch
                                            {
                                                strGroupId = string.Empty;
                                            }
                                        }
                                    }
                                }
                                if (strGroupId != string.Empty)
                                {
                                    inCurrenRowIndex = inRowIndex;
                                    inCurentcolIndex = inColIndex;
                                    frmAccountGroupwiseReport objForm = new frmAccountGroupwiseReport();
                                    objForm.WindowState = FormWindowState.Normal;
                                    objForm.MdiParent   = formMDI.MDIObj;
                                    objForm.CallFromCashFlow(txtFromDate.Text, txttoDate.Text, strGroupId, this, inRowIndex, inColIndex);
                                    this.Enabled = false;
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                this.Enabled = true;

                formMDI.infoError.ErrorString = "CF12:" + ex.Message;
            }
        }