Ejemplo n.º 1
0
    private void LoadGrid()
    {
        try
        {
            DataSet dsStatement = sqlobj.ExecuteSP("SP_ScheduleSummary ",

                                                   new SqlParameter()
            {
                ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
            },
                                                   new SqlParameter()
            {
                ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
            }
                                                   );

            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
            }

            dsStatement.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 2
0
    protected void LoadGrid()
    {
        SqlProcsNew proc   = new SqlProcsNew();
        DataSet     dsGrid = new DataSet();

        dsGrid = proc.ExecuteSP("SP_GetMobAppDinersList",
                                new SqlParameter()
        {
            ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
        },
                                new SqlParameter()
        {
            ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
        },
                                new SqlParameter()
        {
            ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
        });

        if (dsGrid != null && dsGrid.Tables.Count > 0 && dsGrid.Tables[0].Rows.Count > 0)
        {
            ReportList.DataSource = dsGrid.Tables[0];
            ReportList.DataBind();
        }
        else
        {
            ReportList.DataSource = new String[] { };
            ReportList.DataBind();
        }
    }
Ejemplo n.º 3
0
 protected void BtnShow_Click(object sender, EventArgs e)
 {
     try
     {
         ReportList.Visible = true;
         string strrsnfilter = cmbResident.SelectedItem.Text;
         if (cmbResident.SelectedValue != "0" && cmbResident.SelectedValue != "1")
         {
             rdTrailBal.Visible = false;
             string[] custrsn = strrsnfilter.Split(',');
             Session["RName"]         = custrsn[0].ToString();
             lblClosingbal.Visible    = true;
             lblClosingbalval.Visible = true;
             //LoadGrid1();
             LoadOtherDet();
         }
         else if (cmbResident.SelectedValue != "0" && cmbResident.SelectedValue == "1")
         {
             LoadGrid1();
         }
         else
         {
             ReportList.DataSource = string.Empty;
             ReportList.DataBind();
             ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('There is no Transaction for selected date range!');", true);
         }
     }
     catch (Exception ex)
     {
         WebMsgBox.Show(ex.ToString());
     }
 }
    private void LoadStockSummaryReport()
    {
        try
        {
            DataSet dsStockTransaction = sqlobj.ExecuteSP("SP_StockDailySummary",
                                                          new SqlParameter()
            {
                ParameterName = "@Group", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlGroup.SelectedValue == "All" ? null : ddlGroup.SelectedValue
            },

                                                          new SqlParameter()
            {
                ParameterName = "@Date", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
            }
                                                          );

            if (dsStockTransaction.Tables[0].Rows.Count > 0)
            {
                ReportList.DataSource = dsStockTransaction;
                ReportList.DataBind();
            }
            else
            {
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
            }
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 5
0
        private void BindData()
        {
            ReportBLL reportBL = new ReportBLL(connectionString);

            ReportList.DataSource = reportBL.GetReportInventory();
            ReportList.DataBind();
        }
    protected void LoadGrid()
    {
        try
        {
            SqlProcsNew sqlobj  = new SqlProcsNew();
            DataSet     dsGroup = null;
            dsGroup = sqlobj.ExecuteSP("SP_DiningHealthCheck",
                                       new SqlParameter()
            {
                ParameterName = "@IMODE", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
            },
                                       new SqlParameter()
            {
                ParameterName = "@BillPeriod", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = Convert.ToDecimal(ddlBilling.SelectedValue)
            },
                                       new SqlParameter()
            {
                ParameterName = "@Type", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = Convert.ToDecimal(ddlType.SelectedValue)
            });

            ReportList.DataSource = dsGroup.Tables[0];
            ReportList.DataBind();
            dsGroup.Dispose();

            txtHSTot.Text = "Confirmation Pending (" + dsGroup.Tables[1].Rows[0]["TotCnt"].ToString() + ")";
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message.ToString());
        }
    }
    private void LoadUsageBilling()
    {
        try
        {
            DataSet dsStatement = sqlobj.ExecuteSP("SP_DailyUsageBilling ",

                                                   new SqlParameter()
            {
                ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
            },
                                                   new SqlParameter()
            {
                ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
            }
                                                   );

            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
            }
            else
            {
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
            }
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                LoadTitle();

                ReportList.DataSource = string.Empty;
                ReportList.DataBind();


                DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);


                dtpfordate.SelectedDate   = sd;
                dtpuntildate.SelectedDate = DateTime.Now;

                lbltotdebitcredit.Text = "";
            }
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlProcsNew proc = new SqlProcsNew();
        DataSet     dsDT = null;

        if (!IsPostBack)
        {
            LoadTitle();
            CheckPermission();
            dsDT = proc.ExecuteSP("GetServerDateTime");
            // LoadBillingPeriod();
            //ddlBillingPeriod.SelectedValue = Session["CurrentBillingPeriod"].ToString();
            ReportList.Visible    = false;
            ReportListAll.Visible = false;
            ReportList.DataSource = string.Empty;
            ReportList.DataBind();
            DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            dtpfordate.SelectedDate   = sd;
            dtpuntildate.SelectedDate = DateTime.Now;
            lbltotdebitcredit.Text    = "";
            LoadResidentDet();
            LoadSessionFilter();
            LoadAccountNo();
            LoadDate();

            //LoadGrid1();
        }
    }
Ejemplo n.º 10
0
    protected void LoadGrid1()
    {
        SqlCommand cmd = new SqlCommand("[SP_FetchGBilledTransaction]", con);

        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("@BCode ", SqlDbType.NVarChar).Value  = ddlSession.SelectedValue;
        cmd.Parameters.Add("@TxnDate", SqlDbType.DateTime).Value = BillingDate.SelectedDate;
        DataSet dsGrid = new DataSet();

        ReportList.DataBind();

        SqlDataAdapter da = new SqlDataAdapter(cmd);

        da.Fill(dsGrid);
        if (dsGrid != null && dsGrid.Tables.Count > 0 && dsGrid.Tables[0].Rows.Count > 0)
        {
            ReportList.DataSource = dsGrid.Tables[0];
            ReportList.DataBind();

            ReportList.AllowPaging = true;
            lblTotalAmt.Text       = "Total Amount : " + dsGrid.Tables[1].Rows[0]["TotAmount"].ToString();
        }
        else
        {
            ReportList.DataSource = new String[] { };
            ReportList.DataBind();
        }
    }
Ejemplo n.º 11
0
    private void GetMail()
    {
        string receiverid = Request.Cookies["id"].Value.ToString();
        string mailtype   = "开题材料";

        Fannie.Mail ml = new Fannie.Mail();
        DataTable   dt = new DataTable();
        DataSet     ds = ml.GetMail("2", receiverid, mailtype);
        DataColumn  dc = new DataColumn();

        dc.ColumnName = "DataNo";
        ds.Tables[0].Columns.Add(dc);
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            ds.Tables[0].Rows[i]["DataNo"] = (i + 1).ToString();
        }
        ReportList.DataKeyNames = new string[] { "MailNo" };
        ReportList.DataSource   = ds;
        ReportList.DataBind();
        dt = ds.Tables[0];
        if (dt.Rows.Count == 0)
        {
            Label1.Visible = true;
        }
        else
        {
            Label1.Visible = false;
        }
    }
Ejemplo n.º 12
0
    protected void BtnShow_Click(object sender, EventArgs e)
    {
        try
        {
            string strrsnfilter = cmbResident.SelectedItem.Text;


            if (cmbResident.SelectedValue != "0")
            {
                rdTrailBal.Visible = false;
                string[] custrsn = strrsnfilter.Split(',');
                Session["RName"]      = custrsn[0].ToString();
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
                LoadGrid1();
            }
            if (cmbResident.SelectedValue == "0")
            {
                string  STR         = cmbResident.SelectedValue;
                DataSet dsStatement = new DataSet();
                dsStatement = sqlobj.ExecuteSP("SP_DayBookData",
                                               new SqlParameter()
                {
                    ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                }
                                               );
                Session["Exportexcel"] = null;
                if (dsStatement.Tables[0].Rows.Count > 0)
                {
                    ReportList.DataSource = dsStatement.Tables[0];
                    ReportList.DataBind();

                    Session["Exportexcel"] = dsStatement.Tables[0];
                }
                else
                {
                    ReportList.DataSource = string.Empty;
                    ReportList.DataBind();
                    ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('No data for your selection, Please try again for some other details.');", true);
                    return;
                }

                dsStatement.Dispose();
            }
        }


        catch (Exception ex)
        {
            WebMsgBox.Show(ex.ToString());
        }
    }
 protected void LoadAccountLedger()
 {
     try
     {
         DataSet dsCategory = sqlobj.ExecuteSP("SP_AccountMaster",
                                               new SqlParameter()
         {
             ParameterName = "@IMode", SqlDbType = SqlDbType.Int, Value = 3
         });
         if (dsCategory.Tables[0].Rows.Count > 0)
         {
             ReportList.DataSource = dsCategory.Tables[0];
             ReportList.DataBind();
             lblCount.Text           = "Count :" + dsCategory.Tables[0].Rows.Count.ToString();
             Session["ExportExcel"]  = null;
             Session["ExportExcel"]  = dsCategory.Tables[0];
             BtnnExcelExport.Visible = true;
         }
         else
         {
             ReportList.DataSource = string.Empty;
             ReportList.DataBind();
         }
         dsCategory.Dispose();
     }
     catch (Exception ex)
     {
         WebMsgBox.Show(ex.Message);
     }
 }
Ejemplo n.º 14
0
    protected void LoadGrid1()
    {
        try
        {
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();

            if (cmbResident.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_SOAGeneralTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountCode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = lblAccountCode.Text.ToString()
                }
                                               );
            }
            Session["Exportexcel"] = null;
            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                //int rowindex = Convert.ToInt32(dsStatement.Tables[0].Rows.Count - 1);
                //lblClosingbalval.Visible = true;
                //lblClosingbal.Visible = true;
                //lblClosingbalval.Text = dsStatement.Tables[0].Rows[rowindex]["Closing"].ToString();
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
                Session["Exportexcel"] = dsStatement.Tables[0];
            }
            else
            {
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
            }
            //if (dsStatement.Tables[1].Rows.Count > 0)
            //{
            //    lblDebitCnt.Text = dsStatement.Tables[1].Rows[0]["DR"].ToString();
            //}
            //if (dsStatement.Tables[2].Rows.Count > 0)
            //{
            //    lblCreditcnt.Text = dsStatement.Tables[2].Rows[0]["CR"].ToString();
            //}
            dsStatement.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 15
0
    protected void LoadGrid1()
    {
        try
        {
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();

            if (cmbResident.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_SOAGeneralTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountCode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = lblAccountCode.Text.ToString()
                }
                                               );
            }
            Session["Exportexcel"] = null;
            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
                Session["Exportexcel"] = dsStatement.Tables[0];
            }
            else
            {
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('No data for your selection, Please try again for some other details.');", true);
                return;
            }
            //if (dsStatement.Tables[1].Rows.Count > 0)
            //{
            //    lblDebitCnt.Text = dsStatement.Tables[1].Rows[0]["DR"].ToString();
            //}
            //if (dsStatement.Tables[2].Rows.Count > 0)
            //{
            //    lblCreditcnt.Text = dsStatement.Tables[2].Rows[0]["CR"].ToString();
            //}
            dsStatement.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 16
0
    protected void LoadGrid1()
    {
        try
        {
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();



            if (cmbResident.SelectedValue != "0" && ddlAccountNumber.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_SOAGeneralTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountCode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }


            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
            }

            else
            {
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
            }



            dsStatement.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 17
0
        private void bindReportList()
        {
            OracleQuery2 cc2 = new OracleQuery2();
            DataTable    dt  = cc2.LoadReport();

            ReportList.DataSource     = dt;
            ReportList.DataTextField  = "REPORT_NAME";
            ReportList.DataValueField = "REPORT_ID";
            ReportList.DataBind();
            ReportList.Items.Insert(0, new ListItem("--เลือกรายงาน--", "-1"));
            ReportList.SelectedIndex = 0;
            //ReportList.Items.FindByValue("4").Enabled = false;
        }
Ejemplo n.º 18
0
        private void BindData()
        {
            ReportBLL ReportBL = new ReportBLL(connectionString);
            List <ReportViewModel> incident_reports = ReportBL.GetIncidentReportInventory();

            foreach (ReportViewModel model in incident_reports)
            {
                model.Name = GetCarNameFromCarID(model.CarID);
                string[] date_element = model.DateOfIncident.Split(' ');
                model.DateOfIncident = date_element[0];
            }
            ReportList.DataSource = incident_reports;
            ReportList.DataBind();
        }
    protected void cmbResident_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            lblname.Text          = cmbResident.SelectedItem.Text;
            ReportList.Visible    = false;
            ReportList.DataSource = string.Empty;
            ReportList.DataBind();
            ReportListAll.Visible    = false;
            ReportListAll.DataSource = string.Empty;
            ReportListAll.DataBind();
            if (cmbResident.SelectedValue == "0")
            {
                ddlAccountNumber.Items.Clear();
                ddlAccountNumber.Items.Add(new ListItem("All", "0"));
                //ddlAccountNumber.Items.Add("G1000000");
                //ddlAccountNumber.Items.Add("D1000000");
            }
            else
            {
                DataSet dsResident = new DataSet();
                DataSet ds         = new DataSet();

                dsResident = sqlobj.ExecuteSP("SP_GenDropDownList",
                                              new SqlParameter()
                {
                    ParameterName = "@iMode", SqlDbType = SqlDbType.Int, Value = 11
                },
                                              new SqlParameter()
                {
                    ParameterName = "@RTRSN", SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                });
                ddlAccountNumber.DataSource     = dsResident.Tables[0];
                ddlAccountNumber.DataValueField = "AccountNo";
                ddlAccountNumber.DataTextField  = "AccountNo";
                ddlAccountNumber.DataBind();
                LoadOtherDet();
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
            }
        }
        catch (Exception ex)
        {
        }
    }
Ejemplo n.º 20
0
    protected void LoadGrid()
    {
        try
        {
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();


            dsStatement = sqlobj.ExecuteSP("SP_DayBookData",
                                           new SqlParameter()
            {
                ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 2
            },
                                           new SqlParameter()
            {
                ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
            },
                                           new SqlParameter()
            {
                ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
            }

                                           );

            Session["Exportexcel"] = null;
            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
                Session["Exportexcel"] = dsStatement.Tables[0];
            }
            else
            {
                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
            }

            dsStatement.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
Ejemplo n.º 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlProcsNew proc = new SqlProcsNew();
        DataSet     dsDT = null;

        if (!IsPostBack)
        {
            ReportList.Visible = false;
            LoadTitle();
            CheckPermission();
            dsDT = proc.ExecuteSP("GetServerDateTime");
            ReportList.DataSource = string.Empty;
            ReportList.DataBind();
            //DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            //dtpfordate.SelectedDate = sd;
            //dtpuntildate.SelectedDate = DateTime.Now;
            LoadDate();
            LoadResidentDet();
        }
    }
Ejemplo n.º 22
0
    protected void cmbResident_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            ReportList.Visible    = false;
            ReportList.DataSource = string.Empty;
            ReportList.DataBind();
            if (cmbResident.SelectedValue != "0")
            {
                DataSet dsResident = new DataSet();
                dsResident = sqlobj.ExecuteSP("SP_GeneralTransactions",
                                              new SqlParameter()
                {
                    ParameterName = "@IMode", SqlDbType = SqlDbType.Int, Value = 2
                },
                                              new SqlParameter()
                {
                    ParameterName = "@AccountsMRSN", SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                });
                if (cmbResident.SelectedValue != "0" && cmbResident.SelectedValue != "1")
                {
                    lblAccountCode.Text = dsResident.Tables[0].Rows[0]["AccountCode"].ToString();
                }
                else if (cmbResident.SelectedValue != "0" && cmbResident.SelectedValue == "1")
                {
                    lblAccountCode.Text = cmbResident.SelectedValue.ToString();
                }
                else
                {
                    lblAccountCode.Text = cmbResident.SelectedValue.ToString();
                }

                dsResident.Dispose();
                LoadOtherDet();
            }
        }
        catch (Exception ex)
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadTitle();

            LoadProvisionGroup();

            LoadTransactionType();

            ReportList.DataSource = string.Empty;
            ReportList.DataBind();

            ReportSummary.DataSource = string.Empty;
            ReportSummary.DataBind();

            DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);

            dtpfordate.SelectedDate   = sd;
            dtpuntildate.SelectedDate = DateTime.Now;
        }
    }
Ejemplo n.º 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlProcsNew proc = new SqlProcsNew();
        DataSet     dsDT = null;

        if (!IsPostBack)
        {
            LoadTitle();
            CheckPermission();

            dsDT = proc.ExecuteSP("GetServerDateTime");

            // LoadBillingPeriod();

            //ddlBillingPeriod.SelectedValue = Session["CurrentBillingPeriod"].ToString();

            ReportList.DataSource = string.Empty;
            ReportList.DataBind();


            rgDiningSummaryBills.DataSource = string.Empty;
            rgDiningSummaryBills.DataBind();

            rgTCMBillSummary.DataSource = string.Empty;
            rgTCMBillSummary.DataBind();

            DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);


            dtpfordate.SelectedDate   = sd;
            dtpuntildate.SelectedDate = DateTime.Now;

            LoadResidentDet();
            LoadAccountNo();

            //LoadGrid1();
        }
    }
Ejemplo n.º 25
0
        private void BindValues()
        {
            EntityObject[] reports = BusinessManager.List(ReportEntity.GetAssignedMetaClassName(), new FilterElementCollection().ToArray());
            if (reports != null && reports.Length > 0)
            {
                ReportList.DataSource = reports;
                ReportList.DataBind();

                ControlPropertiesBase properties = ControlProperties.Provider;
                if (properties.GetValue(this.ID, keyReport) != null)
                {
                    CommonHelper.SafeSelect(ReportList, (string)properties.GetValue(this.ID, keyReport));
                }

                ReportsRow.Visible   = true;
                NoReportsRow.Visible = false;
            }
            else
            {
                ReportsRow.Visible   = false;
                NoReportsRow.Visible = true;
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlProcsNew proc = new SqlProcsNew();
        DataSet     dsDT = null;

        rwTransactions.VisibleOnPageLoad = true;
        rwTransactions.Visible           = false;
        rdMEB.VisibleOnPageLoad          = true;
        rdMEB.Visible = false;
        DataTable dt = new DataTable();

        if (!IsPostBack)
        {
            LoadTitle();
            dsDT = proc.ExecuteSP("GetServerDateTime");
            ReportList.DataSource = string.Empty;
            ReportList.DataBind();
            DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
            LoadBilling();
            LoadTrailBalance();
            ReportList.Visible      = false;
            BtnnExcelExport.Visible = false;
        }
    }
Ejemplo n.º 27
0
    protected void LoadGrid1()
    {
        try
        {
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();

            //DataSet dsStatement = sqlobj.ExecuteSP("SP_GetStatementofAccount",
            //       new SqlParameter() { ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.BigInt, Value = Convert.ToInt32(cmbResident.SelectedValue.ToString()) },
            //       new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate },
            //       new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate },
            //       new SqlParameter() { ParameterName = "@AcccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue});

            if (cmbResident.SelectedValue == "0" && ddlAccountNumber.SelectedValue == "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetStatementofAccount",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = "NA"
                });
            }
            else if (cmbResident.SelectedValue == "0" && ddlAccountNumber.SelectedValue == "1")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetStatementofAccount",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 2
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }
            else if (cmbResident.SelectedValue == "0" && ddlAccountNumber.SelectedValue == "2")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetStatementofAccount",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 3
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }
            else if (cmbResident.SelectedValue != "0" && ddlAccountNumber.SelectedValue == "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetStatementofAccount",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 4
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }
            else if (cmbResident.SelectedValue != "0" && ddlAccountNumber.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetStatementofAccount",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 5
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }


            ReportList.DataSource = dsStatement;
            ReportList.DataBind();

            //if (dsStatement.Tables[0].Rows.Count > 0)
            //{
            //    ReportList.DataSource = dsStatement;
            //    ReportList.DataBind();
            //}


            dsStatement.Dispose();

            //DataSet dsgetoutstanding = sqlobj.ExecuteSP("SP_GetResidentOutStanding",
            //           new SqlParameter() { ParameterName = "@RSN", SqlDbType = SqlDbType.BigInt, Value = rtrsn.ToString() });

            //if (dsgetoutstanding.Tables[0].Rows.Count > 0)
            //{

            //    decimal os = Convert.ToDecimal(dsgetoutstanding.Tables[0].Rows[0]["OutStanding2"].ToString());

            //    string sos = "0";

            //    if (os < 0)
            //    {
            //        os = Math.Abs(os);

            //        sos = os.ToString() + "CR";

            //    }
            //    else
            //    {
            //        sos = os.ToString();
            //    }


            //    lbloutstanding.Text = DateTime.Now.ToString("dd-MM-yyyy HH:mm") + " Current Outstandings as of now :" + sos.ToString();

            //    Session["Rstatus"] = dsgetoutstanding.Tables[0].Rows[0]["Status"].ToString();

            //    Session["RDescription"] = dsgetoutstanding.Tables[0].Rows[0]["sDescription"].ToString();
            //}

            //if (dsgetoutstanding.Tables[1].Rows.Count > 0)
            //{
            //    lbldepositamount.Text = "Deposit Amount : " + dsgetoutstanding.Tables[1].Rows[0]["DepositAmount"].ToString();
            //}

            //dsgetoutstanding.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
    protected void chkstatus_CheckedChanged(object sender, EventArgs e)
    {
        DataSet dsStatement = new DataSet();

        if (chkstatus.Checked == true)
        {
            if (cmbResident.SelectedValue == "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 3
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = "NA"
                });
            }
            else if (cmbResident.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 4
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }
        }
        if (chkstatus.Checked == false)
        {
            if (cmbResident.SelectedValue == "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = 1
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = "NA"
                });
            }
            else if (cmbResident.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 2
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                });
            }
        }
        if (dsStatement.Tables[0].Rows.Count > 0)
        {
            LoadOtherDet();
            ReportList.DataSource = dsStatement;
            ReportList.DataBind();
            ReportListAll.DataSource = dsStatement;
            ReportListAll.DataBind();
            lblDebitCnt.Text = Convert.ToString(dsStatement.Tables[0].Rows.Count);
        }
        else
        {
            lblDebitCnt.Visible   = false;
            lblCreditcnt.Visible  = false;
            lblTCt.Visible        = false;
            lblLatTxnDt.Visible   = false;
            lblTDt.Visible        = false;
            lblTCt.Visible        = false;
            Label5.Visible        = false;
            Label6.Visible        = false;
            Label8.Visible        = false;
            Label10.Visible       = false;
            Label11.Visible       = false;
            ReportList.DataSource = string.Empty;
            ReportList.DataBind();
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('No record for your selected date range.');", true);
        }



        //if (dsStatement.Tables[0].Rows.Count > 0)
        //{

        //    ReportList.DataSource = dsStatement;
        //    ReportList.DataBind();
        //}

        dsStatement.Dispose();
    }
    protected void LoadGrid1()
    {
        try
        {
            drpSessionfilters.SelectedValue = "0";
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();
            if (chkstatus.Checked == true)
            {
                if (cmbResident.SelectedValue == "0")
                {
                    dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                                   new SqlParameter()
                    {
                        ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 3
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = 1
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = "NA"
                    });
                }
                else if (cmbResident.SelectedValue != "0")
                {
                    dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                                   new SqlParameter()
                    {
                        ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 4
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                    });
                }
            }
            if (chkstatus.Checked == false)
            {
                if (cmbResident.SelectedValue == "0")
                {
                    dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                                   new SqlParameter()
                    {
                        ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = 1
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = "NA"
                    });
                }
                else if (cmbResident.SelectedValue != "0")
                {
                    dsStatement = sqlobj.ExecuteSP("SP_GetUnbilledTransactions",
                                                   new SqlParameter()
                    {
                        ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 2
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@RTRSN", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = cmbResident.SelectedValue
                    },
                                                   new SqlParameter()
                    {
                        ParameterName = "@AccountNo", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue
                    });
                }
            }

            if (dsStatement.Tables[0].Rows.Count > 0)
            {
                LoadOtherDet();
                ReportList.DataSource = dsStatement;
                ReportList.DataBind();
                ReportListAll.DataSource = dsStatement;
                ReportListAll.DataBind();
                lblDebitCnt.Text = Convert.ToString(dsStatement.Tables[0].Rows.Count);
            }
            else
            {
                lblDebitCnt.Visible  = false;
                lblCreditcnt.Visible = false;
                lblTCt.Visible       = false;
                lblLatTxnDt.Visible  = false;
                lblTDt.Visible       = false;
                lblTCt.Visible       = false;
                Label5.Visible       = false;
                Label6.Visible       = false;
                Label8.Visible       = false;
                Label10.Visible      = false;
                Label11.Visible      = false;

                ReportList.DataSource = string.Empty;
                ReportList.DataBind();
                ReportListAll.DataSource = string.Empty;
                ReportListAll.DataBind();
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('No record for your selected date range.');", true);
            }



            //if (dsStatement.Tables[0].Rows.Count > 0)
            //{

            //    ReportList.DataSource = dsStatement;
            //    ReportList.DataBind();
            //}

            dsStatement.Dispose();


            DataSet dsdatewise = sqlobj.ExecuteSP("[SP_GetDatewiseDebitCreditTotal]",
                                                  new SqlParameter()
            {
                ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
            },
                                                  new SqlParameter()
            {
                ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
            });

            if (dsdatewise.Tables[0].Rows.Count > 0)
            {
                decimal totdebit  = Convert.ToDecimal(dsdatewise.Tables[0].Rows[0]["TotalDebit"].ToString());
                decimal totcredit = Convert.ToDecimal(dsdatewise.Tables[0].Rows[0]["TotalCredit"].ToString());

                decimal FOutstading = totdebit - totcredit;
                String  SFOutstading;

                if (FOutstading < 0)
                {
                    SFOutstading = Convert.ToString(FOutstading * -1) + " CR";
                }
                else
                {
                    SFOutstading = Convert.ToString(FOutstading);
                }


                lbltotdebitcredit.Text = "Total Debit:" + totdebit.ToString("0.00") + "  Total Credit:" + totcredit.ToString("0.00");
                lbltotoutstanding.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm") + " Total Current Outstanding as of now :" + SFOutstading;
            }

            dsdatewise.Dispose();


            DataSet dsgetdebitcredittoal = sqlobj.ExecuteSP("[SP_GetFTDebitCreditTotal]");

            if (dsgetdebitcredittoal.Tables[0].Rows.Count > 0)
            {
                decimal totdebit  = Convert.ToDecimal(dsgetdebitcredittoal.Tables[0].Rows[0]["TotalDebit"].ToString());
                decimal totcredit = Convert.ToDecimal(dsgetdebitcredittoal.Tables[0].Rows[0]["TotalCredit"].ToString());

                //lbltotoutstanding.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm") + " Total Current Outstanding as of now :" + (totdebit - totcredit).ToString("0.00");
            }
            else
            {
                lbltotdebitcredit.Text = "";
            }


            dsgetdebitcredittoal.Dispose();
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }
    protected void LoadOtherDet()
    {
        try
        {
            string  STR         = cmbResident.SelectedValue;
            DataSet dsStatement = new DataSet();
            lblDebitCnt.Visible  = false;
            lblCreditcnt.Visible = false;
            lblTCt.Visible       = false;
            lblLatTxnDt.Visible  = false;
            lblTDt.Visible       = false;
            lblTCt.Visible       = false;
            Label5.Visible       = false;
            Label6.Visible       = false;
            Label8.Visible       = false;
            Label10.Visible      = false;
            Label11.Visible      = false;
            if (cmbResident.SelectedValue != "0")
            {
                dsStatement = sqlobj.ExecuteSP("SP_SOAGeneralTransactions",
                                               new SqlParameter()
                {
                    ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 5
                },
                                               new SqlParameter()
                {
                    ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate
                },
                                               new SqlParameter()
                {
                    ParameterName = "@AccountCode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlAccountNumber.SelectedValue.ToString()
                }
                                               );



                if (dsStatement.Tables[1].Rows.Count > 0)
                {
                    //lblDebitCnt.Text = dsStatement.Tables[1].Rows[0]["DR"].ToString();
                }
                else
                {
                    lblDebitCnt.Text = "-";
                }
                if (dsStatement.Tables[2].Rows.Count > 0)
                {
                    lblCreditcnt.Text = dsStatement.Tables[2].Rows[0]["CR"].ToString();
                }
                else
                {
                    lblCreditcnt.Text = "-";
                }
                //if (dsStatement.Tables[3].Rows.Count > 0)
                //{
                //    lblCategory.Text = dsStatement.Tables[3].Rows[0]["AccountGroup"].ToString();
                //    lblSubGrp1.Text = dsStatement.Tables[3].Rows[0]["SubGroup1"].ToString();
                //}
                //else
                //{
                //    lblCategory.Text = "-";
                //    lblSubGrp1.Text = "-";
                //}
                if (dsStatement.Tables[3].Rows.Count > 0)
                {
                    lblLatTxnDt.Text = dsStatement.Tables[3].Rows[0]["LastTxn"].ToString();
                }

                else
                {
                    ReportList.DataSource = string.Empty;
                    ReportList.DataBind();

                    lblTCt.Text      = "0.00";
                    lblLatTxnDt.Text = "-";
                }
                if (dsStatement.Tables[4].Rows.Count > 0)
                {
                    lblTDt.Text = dsStatement.Tables[4].Rows[0]["DR"].ToString();
                }
                else
                {
                    lblTDt.Text = "0.00";
                }
                if (dsStatement.Tables[5].Rows.Count > 0)
                {
                    lblTCt.Text = dsStatement.Tables[5].Rows[0]["CR"].ToString();
                }
                else
                {
                    ReportList.DataSource = string.Empty;
                    ReportList.DataBind();
                    lblTCt.Text = "0.00";
                }
                Label6.Visible      = true;
                Label8.Visible      = true;
                Label10.Visible     = true;
                lblDebitCnt.Visible = true;
                lblLatTxnDt.Visible = true;
                lblTDt.Visible      = true;

                dsStatement.Dispose();
            }
        }
        catch (Exception ex)
        {
            WebMsgBox.Show(ex.Message);
        }
    }