Exemple #1
0
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string SummaryOrIndivudual = RadioButtonList1.SelectedValue;
                if (SummaryOrIndivudual == "IndividualItem")
                {
                    string    AsPer = rdoAsPer.SelectedValue;
                    Hashtable ht    = new Hashtable();
                    ht.Add("DateFrom", txtDateFrom.Text);
                    ht.Add("DateTo", txtDateTo.Text);
                    ht.Add("AssetCode", txtAssetCode.Text);
                    ht.Add("AsPer", rdoAsPer.SelectedValue);
                    ht.Add("OCode", ((SessionUser)base.Session["SessionUser"]).OCode);
                    //ht.Add("OCode", "8989");

                    DataTable dt = new DataTable();
                    DataSet   ds = new DataSet();
                    ds = ReportsBll.AssetRegister(ht, SummaryOrIndivudual);
                    DataTable data      = ds.Tables[0];
                    DataTable dtCompany = ds.Tables[1];
                    BindReport(dtCompany, data, AsPer, RadioButtonList1.SelectedValue);
                }
                else if (SummaryOrIndivudual == "Summary")
                {
                    string    AsPer = rdoAsPer.SelectedValue;
                    Hashtable ht    = new Hashtable();
                    ht.Add("DateFrom", txtDateFrom.Text);
                    ht.Add("DateTo", txtDateTo.Text);
                    ht.Add("AsPer", rdoAsPer.SelectedValue);
                    ht.Add("OCode", ((SessionUser)base.Session["SessionUser"]).OCode);
                    //ht.Add("OCode", "8989");

                    DataTable dt = new DataTable();
                    DataSet   ds = new DataSet();
                    ds = ReportsBll.AssetRegister(ht, SummaryOrIndivudual);
                    DataTable data      = ds.Tables[0];
                    DataTable dtCompany = ds.Tables[1];
                    BindReport(dtCompany, data, AsPer, SummaryOrIndivudual);
                }
            }
            catch
            {
            }
        }