public void dataload()
        {
            DataTable dt = new DataTable();

            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);

            query = "SELECT ROW_NUMBER() OVER(PARTITION BY [lekhashirsh] ORDER BY [SubType]) as 'SrNo',a.[LekhaShirsh] as 'lekhashirsh',a.[LekhaShirshName] as 'LekhaShirshName',a.[KamacheName] as kamachenav,a.[GRoadKramank] as RastaKr,a.[GlengthStarted] as Pasun,a.[GlengthUpto] as Pryant,a.[GlengthTotal] as Ekun,a.[GRoadPrushthbhag] as Prustbhag,a.[GRoll] as Pikroll,a.[GNewKhadikaran] as navinkhdikarn,a.[GBM_Carpet] as BMCarpet,a.[G20_MM] as mmcarpetsah,a.[GSurface]as serface,a.[GRundikaran] as rundikarn,a.[GBridge_Morya]as Pull,a.[GAnya] as anya,a.[GRepairExpn] as DurustichaKhrch,b.[KamachiKimat]as kamchikinmat,a.[GJobKramank]as jobkr,a.Shera as shera  from [BudgetMasterGAT_FBC] as a join [GAT_FBCProvision] as b on a.WorkID=b.WorkID where a.[Type]=N'गट बी' and b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "'";

            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.Text == "संपूर्ण")
                {
                    string[] cols = new string[2];
                    cols[0] = "LekhaShirshName";
                    cols[1] = "lekhashirsh";
                    helper.RegisterGroup(cols, true, true);

                    helper.RegisterSummary("kamchikinmat", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("kamchikinmat", SummaryOperation.Sum);
                    helper.RegisterSummary("DurustichaKhrch", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("DurustichaKhrch", SummaryOperation.Sum);
                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();
                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterGAT_FBC");
                    foreach (DataRow dr in dt.Rows)
                    {
                        GridView1.DataSource = dt;
                        GridView1.DataBind();
                    }
                }
            }
            else
            {
                string[] cols = new string[2];
                cols[0] = "lekhashirsh";
                cols[1] = "LekhaShirshName";
                helper.RegisterGroup(cols, true, true);

                helper.RegisterSummary("kamchikinmat", SummaryOperation.Sum);
                helper.RegisterSummary("DurustichaKhrch", SummaryOperation.Sum);
                helper.GroupSummary += new GroupEvent(helper_Bug);
                helper.ApplyGroupSort();
                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterGAT_FBC");
                foreach (DataRow dr in dt.Rows)
                {
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                }
            }

            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 100 , 100 ,false); </script>", false);

            Session["LekhasirshGAT_BRpt"] = GridView1;
        }
Exemplo n.º 2
0
        protected void GroupGridViewCells()
        {
            GridViewHelper helper = new GridViewHelper(grdFruttiInGruppo);

            helper.RegisterGroup("NomeGruppo", true, true);
            helper.ApplyGroupSort();
        }
Exemplo n.º 3
0
        protected void Filtering()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "DB_" + (string)Session["project"];
            _clscassheet _objcas = new _clscassheet();

            _objcas.sch      = Convert.ToInt32((string)Session["sch"]);
            _objcas.prj_code = (string)Session["project"];
            _objcas.filter   = Convert.ToInt32(drfilterby.SelectedItem.Value);
            _objcas.element  = drfilter.SelectedItem.Text;
            //info.AddMergedColumns(new int[] { 2, 3, 4, 5 }, "Asset Code");
            mygrid.DataSource = _objbll.Filtering(_objcas, _objdb);
            mygrid.DataBind();
            //for (int i = 0; i <= mygrid.Rows.Count - 1; i++)
            //{
            //    mygrid.Rows[i].Cells[0].Text = (i + 1).ToString();
            //}
            GridViewHelper _help = new GridViewHelper(mygrid);

            _help.RegisterGroup("Sys_name", true, true);
            _help.GroupHeader += new GroupEvent(helper_GroupHeader);
            _help.ApplyGroupSort();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if ((Request.QueryString["CompanyName"]) != null)
                {
                    ddlFilterBy.SelectedValue = "CompanyName";

                    Session[CONST_WHERECLAUSE_SESSIONVAR] = "CompanyName LIKE '%" + Request.QueryString["CompanyName"].ToString() + "%'";
                }
                if (Session[CONST_WHERECLAUSE_SESSIONVAR] != null)
                {
                    string _FilterBy = (string)Session[CONST_WHERECLAUSE_SESSIONVAR];
                    _FilterBy        = _FilterBy.Remove(0, _FilterBy.IndexOf("%") + 1);
                    _FilterBy        = _FilterBy.Remove(_FilterBy.IndexOf("%"));
                    tbxFilterBy.Text = _FilterBy;
                }

/*
 * else
 *        Session[CONST_WHERECLAUSE_SESSIONVAR] = "";
 */
                gvReoccuringOrders.Sort("CompanyName", SortDirection.Ascending);
            }
            else
            if (Session[CONST_WHERECLAUSE_SESSIONVAR] != null)
            {
                lblFilter.Text = Session[CONST_WHERECLAUSE_SESSIONVAR].ToString();
            }

            GridViewHelper _gvHelper = new GridViewHelper(this.gvReoccuringOrders);

            _gvHelper.RegisterGroup("CompanyName", true, false);
            _gvHelper.ApplyGroupSort();
        }
Exemplo n.º 5
0
        public void GroupIt()
        {
            try
            {
                helper = new GridViewHelper(this.gv_Report);
                helper.RegisterGroup("ShiftDate", true, true);

                helper.RegisterSummary("Duration", SummaryOperation.Sum, "ShiftDate");
                helper.RegisterSummary("VolunteerName", SummaryOperation.Count, "ShiftDate");



                helper.RegisterSummary("Duration", SummaryOperation.Sum);
                helper.RegisterSummary("VolunteerName", SummaryOperation.Count);


                // helper.RegisterGroup("ClientZipCode", true, true);
                helper.GroupHeader    += new GroupEvent(helper_GroupHeader);
                helper.GroupSummary   += new GroupEvent(helper_Bug);
                helper.GeneralSummary += new FooterEvent(helper_GeneralSummary);
                helper.ApplyGroupSort();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["userID"] == null)
                {
                    Response.Redirect("login.aspx?pag=dash-inspect");
                }
                if (Convert.ToInt32(Session["userRol"]) > 2)
                {
                    string select = "";
                    if (Convert.ToInt32(Session["userRol"]) == 3)
                    {
                        select = "SELECT tbl_inspect.inspect_id, tbl_areas.area_name, tbl_formats.format_codigo, tbl_inspect.inspect_date, tbl_inspect.inspect_start, tbl_inspect.usr_username, tbl_actionPlan.actPlan_id, tbl_status.stat_id, tbl_status.stat_desc FROM tbl_inspect INNER JOIN tbl_formats ON tbl_inspect.format_id = tbl_formats.format_id INNER JOIN tbl_areas ON tbl_inspect.area_id = tbl_areas.area_id INNER JOIN tbl_actionPlan ON tbl_inspect.inspect_id = tbl_actionPlan.key1 INNER JOIN tbl_status ON tbl_inspect.stat_id = tbl_status.stat_id WHERE tbl_actionPlan.proc_id=7";
                    }
                    else if (Convert.ToInt32(Session["userRol"]) == 4)
                    {
                        select = "SELECT tbl_inspect.inspect_id, tbl_areas.area_name, tbl_formats.format_codigo, tbl_inspect.inspect_date, tbl_inspect.inspect_start, tbl_inspect.usr_username, tbl_actionPlan.actPlan_id, tbl_status.stat_id, tbl_status.stat_desc FROM tbl_inspect INNER JOIN tbl_formats ON tbl_inspect.format_id = tbl_formats.format_id INNER JOIN tbl_areas ON tbl_inspect.area_id = tbl_areas.area_id INNER JOIN tbl_actionPlan ON tbl_inspect.inspect_id = tbl_actionPlan.key1 INNER JOIN tbl_status ON tbl_inspect.stat_id = tbl_status.stat_id WHERE tbl_actionPlan.proc_id=7 AND tbl_inspect.usr_username='******' ORDER BY tbl_formats.format_codigo,tbl_inspect.inspect_id DESC";
                    }
                    sds_inspects.SelectCommand = select;
                    GridView1.DataBind();
                }
            }

            GridViewHelper helper = new GridViewHelper(this.GridView1);

            helper.RegisterGroup("format_codigo", true, true);
            helper.ApplyGroupSort();
        }
Exemplo n.º 7
0
        //private void fillRemisiones(int idEntradaInventario)
        //{
        //    try
        //    {
        //        rep_remisiones.DataSource = SalidaCtrl.RemisionGetByIdInventario(idEntradaInventario);
        //        rep_remisiones.DataBind();
        //    }
        //    catch
        //    {
        //        throw;
        //    }
        //}

        private void fillEntradaTarimaAlmacen()
        {
            try
            {
                txt_dato.Text = hf_codigo.Value;
                btn_buscar_click(null, null);


                txt_elaboro.Text = ((MstCasc)this.Master).getUsrLoged().Nombre;
                //hf_img_vendor.Value = BarCode.Encode(oCV.Codigo);



                //Ordenes y codigos por pedimento
                //List<Entrada_inventario> lst = EntradaCtrl.InventarioMaquilado(oE.Id);
                //rep_oc_by_pedimento.DataSource = lst;
                //rep_oc_by_pedimento.DataBind();

                grd_mercancia_disp.DataSource = "";
                grd_mercancia_disp.DataBind();

                GridViewHelper helper = new GridViewHelper(this.grd_mercancia_disp);

                helper.RegisterGroup("mercancia_codigo", true, true);
                helper.GroupHeader += new GroupEvent(helper_GroupHeader);
                helper.ApplyGroupSort();
            }
            catch
            {
                throw;
            }
        }
Exemplo n.º 8
0
        //Metodi per la gridView con intestazioni dinamiche
        protected void GroupGridViewCells()
        {
            GridViewHelper helper = new GridViewHelper(grdStampaVerificaCant);

            helper.RegisterGroup("Tipologia", true, true);
            helper.ApplyGroupSort();
        }
        protected void GroupGridViewCells()
        {
            GridViewHelper helper = new GridViewHelper(grdGruppiInLocale);

            helper.RegisterGroup("NomeLocale", true, true);
            helper.ApplyGroupSort();
        }
Exemplo n.º 10
0
    void grid_kpr()
    {
        SqlCommand     cmd2 = new SqlCommand("SELECT *,case when B.cap_status = 'A' then 'AKTIF' else 'TIDAK AKTIF' end as sts FROM hr_cmn_appr_section A INNER JOIN hr_cmn_appraisal B ON A. cse_section_cd=B.cap_section_cd WHERE A.cse_sec_type='01' AND A.cse_sec_jawatan like '%" + txt_kat_jaw.Text + "%' order by cse_section_desc", con);
        SqlDataAdapter da2  = new SqlDataAdapter(cmd2);
        DataSet        ds2  = new DataSet();

        da2.Fill(ds2);
        if (ds2.Tables[0].Rows.Count == 0)
        {
            ds2.Tables[0].Rows.Add(ds2.Tables[0].NewRow());
            GridView3.DataSource = ds2;
            GridView3.DataBind();
            int columncount = GridView3.Rows[0].Cells.Count;
            GridView3.Rows[0].Cells.Clear();
            GridView3.Rows[0].Cells.Add(new TableCell());
            GridView3.Rows[0].Cells[0].ColumnSpan = columncount;
            GridView3.Rows[0].Cells[0].Text       = "<center><strong>Maklumat Carian Tidak Dijumpai</strong></center>";
        }
        else
        {
            GridView3.DataSource = ds2;
            GridView3.DataBind();
            GridViewHelper helper = new GridViewHelper(this.GridView3);
            helper.RegisterGroup("cse_section_desc", true, true);
            helper.GroupHeader += new GroupEvent(helper_GroupHeader);
            helper.RegisterSummary("cap_weightage", SummaryOperation.Sum, "cse_section_desc");
            helper.GroupSummary += new GroupEvent(helper_GroupSummary);
            helper.ApplyGroupSort();
        }
    }
Exemplo n.º 11
0
        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            BuscaDados();
            //Agrupamento do GridView
            GridViewHelper helper = new GridViewHelper(this.GridRelVnd);

            helper.RegisterGroup("ds_vendedor", true, true);
            helper.RegisterSummary("vl_unitario", SummaryOperation.Sum, "ds_vendedor");
            helper.ApplyGroupSort();
        }
Exemplo n.º 12
0
        protected void Load_Ini_Data()
        {
            //BLL_Dml _objbll = new BLL_Dml();
            //_clscassheet _objcas = new _clscassheet();
            ////Session["sch"] = Request.QueryString[0].ToString();
            //_objcas.sch = 4;
            //_objcas.prj_code = "1";
            //mygrid.DataSource = _objbll.Load_casMain(_objcas);
            //mygrid.DataBind();
            //load_cas_sys();
            GridViewHelper _help = new GridViewHelper(mygrid);

            _help.RegisterGroup("sys_name", true, true);
            _help.ApplyGroupSort();
        }
Exemplo n.º 13
0
        protected void BindGrid(string Wherecondition)
        {
            strcmd = "SELECT [HeadType]as 'HeadName', [Work_Id]as 'WorkId',[WorkName]as'Work Name',[Santion_Date]as'Sanction Date',[Kamachi_Mudat]as 'Work Validity',[KamPurn_Date]as'Work Complition Date',[Bill_1_To]+',  '+[BIll_To_Mob]as'Bill To Contractor',[Bill_By_Post]+',  '+[Bill_1_By]+',  '+[Bill_By_Mob]as'Bill By',[AA_Cost]as 'AACost' ";

            if (Wherecondition == "HeadType")
            {
                strcmd += ",[Bill_1_Amt]as'1st Bill Amt',[Bill_1_Date]as'1st Bill Date',[Bill_2_Amt]as'2nd Bill Amt',[Bill_2_Date]as '2nd Bill Date',[Bill_3_Amt]as'3rd Bill Amt',[Bill_3_Date]as'3rd Bill Date',[Bill_4_Amt]as'4th Bill Amt',[Bill_4_Date]as'4th Bill Date',[Bill_5_Amt]as '5th Bill Amt',[Bill_5_Date]as'5th Bill Date',[Bill_6_Amt]as'6th Bill Amt',[Bill_6_Date]as'6th Bill date',[Bill_7_Amt]as'7th Bill Amt',[Bill_7_Date]as'7th Bill Date',[Bill_8_Amt]as'8th Bill Amt',[Bill_8_Date]as'8th Bill Date',[Bill_9_Amt]as'9th Bill Amt',[Bill_9_Date]as'9th Bill Date',[Bill_final_Amt]as'Final Bill Amt',[Bill_final_Date]as'Final Bill Date',[Bill_Total]as' Bill Total'  FROM [tbl_Bill_Status] Where [HeadType]='" + ddlHeadName.SelectedItem.Text + "' and [BudgetYear]='" + ddlArthYear.SelectedItem.Text + "' order by [HeadType]";
            }
            else if (Wherecondition == "BillNo" && ddlBillType.SelectedItem.Text != "निवडा")
            {
                string[] str = new string[5];
                str = ddlBillType.SelectedItem.Value.Split('[', ']');
                if (ddlHeadName.SelectedItem.Text != "निवडा")
                {
                    strcmd += ddlBillType.SelectedItem.Value + "FROM [tbl_Bill_Status] Where [HeadType]='" + ddlHeadName.SelectedItem.Text + "' and [BudgetYear]='" + ddlArthYear.SelectedItem.Text + "' and " + str[1] + " > 0 order by [HeadType]";
                }
                else
                {
                    strcmd += ddlBillType.SelectedItem.Value + "FROM [tbl_Bill_Status] Where [BudgetYear]='" + ddlArthYear.SelectedItem.Text + "'  and " + str[1] + " > 0 order by [HeadType]";
                }
            }
            else
            {
                strcmd += ",[Bill_1_Amt]as'1st Bill Amt',[Bill_1_Date]as'1st Bill Date',[Bill_2_Amt]as'2nd Bill Amt',[Bill_2_Date]as '2nd Bill Date',[Bill_3_Amt]as'3rd Bill Amt',[Bill_3_Date]as'3rd Bill Date',[Bill_4_Amt]as'4th Bill Amt',[Bill_4_Date]as'4th Bill Date',[Bill_5_Amt]as '5th Bill Amt',[Bill_5_Date]as'5th Bill Date',[Bill_6_Amt]as'6th Bill Amt',[Bill_6_Date]as'6th Bill date',[Bill_7_Amt]as'7th Bill Amt',[Bill_7_Date]as'7th Bill Date',[Bill_8_Amt]as'8th Bill Amt',[Bill_8_Date]as'8th Bill Date',[Bill_9_Amt]as'9th Bill Amt',[Bill_9_Date]as'9th Bill Date',[Bill_final_Amt]as'Final Bill Amt',[Bill_final_Date]as'Final Bill Date',[Bill_Total]as' Bill Total'  FROM [tbl_Bill_Status] Where [BudgetYear]='" + ddlArthYear.SelectedItem.Text + "' order by [HeadType]";
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);

            string[] cols = new string[2];
            cols[0] = "HeadName";
            cols[1] = "AACost";
            helper.RegisterGroup("HeadName", true, true);
            helper.ApplyGroupSort();

            if (con.State != ConnectionState.Open)
            {
                con.Open();
            }
            da = new SqlDataAdapter(strcmd, con);
            DataSet ds = new DataSet();

            GridView1.AllowSorting = false;
            da.Fill(ds);
            GridView1.DataSource = ds;

            GridView1.DataBind();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }
        this.btnEdit.Attributes.Add("OnClick", "Ayuda('../Operacion/Remisiones/helpRemisiones.aspx')");
        ibtnSolicitar.Attributes.Add("OnClick", "return confirm('Esta a punto de solicitar la Autorización');");
        //sdsAsesoresAutoriza.DataBind();

        GridViewHelper helper = new GridViewHelper(this.gvReporteRemisiones, true);

        helper.RegisterSummary("TOTAL", SummaryOperation.Sum);
        helper.RegisterSummary("SLP", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_CC", SummaryOperation.Sum);
        helper.RegisterSummary("QRO", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("CEL", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("IRA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_BJ", SummaryOperation.Sum);
        helper.RegisterGroup("negociacion", true, true); //helper.SetSuppressGroup("negociacion");
        helper.RegisterSummary("SLP", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_CC", SummaryOperation.Sum);
        helper.RegisterSummary("QRO", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("CEL", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("IRA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("TOTAL", SummaryOperation.Sum, "negociacion");
        helper.GroupHeader  += new GroupEvent(helper_GroupHeader);
        helper.GroupSummary += new GroupEvent(helper_Bug);
        helper.ApplyGroupSort();
    }
Exemplo n.º 15
0
        private void Load_data()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "DB_BCC1";
            _clscassheet _objcas = new _clscassheet();

            _objcas.sch       = 1;
            _objcas.prj_code  = "BCC1";
            mygrid.DataSource = _objbll.Load_casMain_Edit(_objcas, _objdb);
            mygrid.DataBind();
            GridViewHelper _help = new GridViewHelper(mygrid);

            _help.RegisterGroup("Sys_name", true, true);
            _help.GroupHeader += new GroupEvent(helper_GroupHeader);
            _help.ApplyGroupSort();
        }
Exemplo n.º 16
0
        protected void Load_Ini_Data()
        {
            //BLL_Dml _objbll = new BLL_Dml();
            //_database _objdb = new _database();
            //_objdb.DBName = "DB_" + (string)Session["project"];
            //_clscassheet _objcas = new _clscassheet();
            //_objcas.sch = Convert.ToInt32((string)Session["sch"]);
            //_objcas.prj_code = (string)Session["project"];
            //mygrid.DataSource = _objbll.Load_casMain_Edit(_objcas, _objdb);
            //mygrid.DataBind();
            mygrid.DataSource = _dtMaster;
            mygrid.DataBind();
            GridViewHelper _help = new GridViewHelper(mygrid);

            _help.RegisterGroup("Sys_name", true, true);
            _help.GroupHeader += new GroupEvent(helper_GroupHeader);
            _help.ApplyGroupSort();
        }
Exemplo n.º 17
0
        protected void btn_buscar_click(object sender, EventArgs args)
        {
            try
            {
                grd_fondeo.DataSource = "";
                grd_fondeo.DataBind();

                GridViewHelper helper = new GridViewHelper(this.grd_fondeo);

                helper.RegisterGroup("Folio", true, true);
                helper.GroupHeader += new GroupEvent(helper_GroupHeader);
                helper.ApplyGroupSort();
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Exemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                btnStampa.CssClass = "w3-btn w3-white w3-border w3-border-blue w3-round-large w3-disabled";
                CaricaCombo();
            }

            #region GRIGLIA CON RAGGRUPPAMENTO RIGHE
            GridViewHelper helper = new GridViewHelper(this.gv_DatiStampa);

            string[] cols = new string[4];
            cols[0] = "IndirizzoCollaboratore";
            cols[1] = "CittaCollaboratore";
            cols[2] = "TelefonoCollaboratore";
            cols[3] = "CodFiscaleCollaboratore";

            helper.RegisterGroup("NomeCollaboratore", true, true);
            helper.RegisterGroup(cols, true, true);
            helper.GroupHeader  += new GroupEvent(Helper_GroupHeader);
            helper.GroupSummary += new GroupEvent(Helper_GroupSummary);
            //helper.GeneralSummary += new FooterEvent(Helper_GeneralSummary);

            //SUBTOTALE
            helper.RegisterSummary("Mista", SummaryOperation.Sum, "NomeCollaboratore");
            helper.RegisterSummary("RimborsoKm", SummaryOperation.Sum, "NomeCollaboratore");
            helper.RegisterSummary("Assunzione", SummaryOperation.Sum, "NomeCollaboratore");
            helper.RegisterSummary("RitenutaAcconto", SummaryOperation.Sum, "NomeCollaboratore");
            helper.RegisterSummary("FatturaLordo", SummaryOperation.Sum, "NomeCollaboratore");
            //helper.RegisterSummary("Diaria", SummaryOperation.Sum, "NomeCollaboratore");

            //TOTALE
            //helper.RegisterSummary("Mista", SummaryOperation.Sum);
            //helper.RegisterSummary("RimborsoKm", SummaryOperation.Sum);
            //helper.RegisterSummary("Assunzione", SummaryOperation.Sum);
            //helper.RegisterSummary("RitenutaAcconto", SummaryOperation.Sum);
            //helper.RegisterSummary("Fattura", SummaryOperation.Sum);
            ////helper.RegisterSummary("Diaria", SummaryOperation.Sum);

            helper.ApplyGroupSort();
            #endregion

            ScriptManager.RegisterStartupScript(Page, typeof(Page), "chiudiLoader", script: "$('.loader').hide();", addScriptTags: true);
        }
Exemplo n.º 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        GridViewHelper helper = new GridViewHelper(this.gvReporteRemisiones, true);

        helper.RegisterSummary("TOTAL", SummaryOperation.Sum);
        helper.RegisterSummary("SLP", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_CC", SummaryOperation.Sum);
        helper.RegisterSummary("QRO", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("CEL", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("IRA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_BJ", SummaryOperation.Sum);
        helper.RegisterGroup("negociacion", true, true); //helper.SetSuppressGroup("negociacion");
        helper.RegisterSummary("SLP", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("SLP_CC", SummaryOperation.Sum);
        helper.RegisterSummary("QRO", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("QRO_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("CEL", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("CEL_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("IRA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_SA", SummaryOperation.Sum);
        //helper.RegisterSummary("IRA_BJ", SummaryOperation.Sum);
        helper.RegisterSummary("TOTAL", SummaryOperation.Sum, "negociacion");
        helper.GroupHeader  += new GroupEvent(helper_GroupHeader);
        helper.GroupSummary += new GroupEvent(helper_Bug);
        helper.ApplyGroupSort();
    }
Exemplo n.º 20
0
    void grid_kpr1()
    {
        SqlCommand     cmd2 = new SqlCommand("select cse_section_desc as bah_dec,sap_post_cat_cd sub_cd,sap_subject_cd as sub_desc,sap_weightage weight from hr_staff_appraisal A INNER JOIN hr_cmn_appr_section B ON A. sap_section_cd=B.cse_section_cd where A.sap_staff_no='" + Kaki_no.Text + "' and A.sap_year= '" + txt_tahun.Text + "' and A.cse_sec_jawatan='" + txt_kat_jaw.Text + "' and A.cse_sec_type='02' order by cse_section_desc", con);
        SqlDataAdapter da2  = new SqlDataAdapter(cmd2);
        DataSet        ds2  = new DataSet();

        da2.Fill(ds2);
        if (ds2.Tables[0].Rows.Count == 0)
        {
            ds2.Tables[0].Rows.Add(ds2.Tables[0].NewRow());
            GridView2.DataSource = ds2;
            GridView2.DataBind();
            int columncount = GridView2.Rows[0].Cells.Count;
            GridView2.Rows[0].Cells.Clear();
            GridView2.Rows[0].Cells.Add(new TableCell());
            GridView2.Rows[0].Cells[0].ColumnSpan = columncount;
            GridView2.Rows[0].Cells[0].Text       = "<center><strong>Maklumat Carian Tidak Dijumpai</strong></center>";
            GridView2.Visible = false;
            grd2_shw.Visible  = false;
            Button4.Text      = "Simpan";
        }
        else
        {
            GridView2.DataSource = ds2;
            GridView2.DataBind();
            GridViewHelper helper = new GridViewHelper(this.GridView2);
            helper.RegisterGroup("bah_dec", true, true);
            helper.GroupHeader += new GroupEvent(helper_GroupHeader1);
            helper.RegisterSummary("weight", SummaryOperation.Sum, "bah_dec");
            helper.GroupSummary += new GroupEvent(helper_GroupSummary1);
            helper.ApplyGroupSort();
            GridView2.Visible = true;
            grd2_shw.Visible  = true;
            Button4.Text      = "Kemaskini";
        }
    }
Exemplo n.º 21
0
        private void caragar_menu_items()
        {
            PerfilObj perfil = new PerfilObj();

            if (perfiles.Length > 0)
            {
                perfil.id = int.Parse(cboxPerfiles.SelectedValue);
            }
            else
            {
                perfil.id = 0;
            }
            BeanMenuPerfil [] lsList = Globales.servicio.obtener_menu_usuario_perfil(perfil);
            contMenuItem = lsList.Length;
            permisoUsuario.DataSource = lsList;
            permisoUsuario.DataBind();

            GridViewHelper helper = new GridViewHelper(this.permisoUsuario);

            helper.RegisterGroup("menuPadre", true, true);
            helper.GroupHeader += new GroupEvent(helper_GroupHeader);
            helper.ApplyGroupSort();
            permisoUsuario.DataBind();
        }
        public void dataload()
        {
            DataTable dt = new DataTable();

            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);

            query = "SELECT ROW_NUMBER() OVER(PARTITION BY [lekhashirsh] ORDER BY [SubType]) as 'SrNo',a.[SubType] ,a.[Upvibhag] as 'Upvibhag',a.[LekhaShirshName] as 'LekhaShirshName',a.PageNo as 'पेज क्र',a.ArthsankalpiyBab as 'बाब क्र',a.JulyBab as 'जुलै/ बाब क्र./पान क्र.',a.[KamacheName] as 'कामाचे नाव',b.[ManjurAmt] as ManjurAmt,b.[MarchEndingExpn] as MarchEndingExpn,b.[UrvaritAmt] as UrvaritAmt,b.[Takunone] as Takunone,b.[Takuntwo] as Takuntwo,b.[Tartud] as Tartud,b.[AkunAnudan] as AkunAnudan,b.[Magilkharch] as Magilkharch,b.[Magni] as Magni,CAST(CASE WHEN a.[Sadyasthiti] = 'Completed'  THEN 1 ELSE 0 END as decimal(18,0)) as 'C',CAST(CASE WHEN a.[Sadyasthiti] = 'Processing'  THEN 1 ELSE 0 END as decimal(18,0)) as 'P',CAST(CASE WHEN a.[Sadyasthiti] = 'Not Started'  THEN 1 ELSE 0 END as decimal(18,0)) as 'NS',a.[Shera] as 'शेरा' FROM BudgetMasterRoad as a join RoadProvision as b on a.Workid=b.Workid where b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "'";

            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.Text == "संपूर्ण")
                {
                    string[] cols = new string[2];
                    cols[0] = "LekhaShirshName";
                    cols[1] = "Upvibhag";
                    helper.RegisterGroup(cols, true, true);
                    helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum);
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                    helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum);
                    helper.RegisterSummary("Takunone", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("Takunone", SummaryOperation.Sum);
                    helper.RegisterSummary("Takuntwo", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("Takuntwo", SummaryOperation.Sum);
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                    helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum);
                    helper.RegisterSummary("Magilkharch", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("Magilkharch", SummaryOperation.Sum);
                    helper.RegisterSummary("Magni", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("Magni", SummaryOperation.Sum);
                    helper.RegisterSummary("C", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("C", SummaryOperation.Sum);
                    helper.RegisterSummary("P", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("P", SummaryOperation.Sum);
                    helper.RegisterSummary("NS", SummaryOperation.Sum, "LekhaShirshName+Upvibhag");
                    helper.RegisterSummary("NS", SummaryOperation.Sum);
                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();
                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterRoad");
                    foreach (DataRow dr in dt.Rows)
                    {
                        GridView1.DataSource = dt;
                        GridView1.DataBind();
                    }
                }
            }
            else
            {
                helper.RegisterGroup("LekhaShirshName", true, true);
                helper.RegisterGroup("Upvibhag", true, true);

                helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum);
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum);
                helper.RegisterSummary("Takunone", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("Takunone", SummaryOperation.Sum);
                helper.RegisterSummary("Takuntwo", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("Takuntwo", SummaryOperation.Sum);
                helper.RegisterSummary("Tartud", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum);
                helper.RegisterSummary("Magilkharch", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("Magilkharch", SummaryOperation.Sum);
                helper.RegisterSummary("Magni", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("Magni", SummaryOperation.Sum);
                helper.RegisterSummary("C", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("C", SummaryOperation.Sum);
                helper.RegisterSummary("P", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("P", SummaryOperation.Sum);
                helper.RegisterSummary("NS", SummaryOperation.Sum, "Upvibhag");
                helper.RegisterSummary("NS", SummaryOperation.Sum);

                helper.GroupSummary += new GroupEvent(helper_Bug);
                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterRoad");
                foreach (DataRow dr in dt.Rows)
                {
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                }
            }
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 101 , 100 ,false); </script>", false);
            Session["Report_LekhasirshRoad"] = GridView1;
        }
Exemplo n.º 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["User"] == null || Session["Role"] == null)
                Response.Redirect("../Login.aspx");

            if (!Page.IsPostBack)
            {
                ddlStatus.DataBind();
                SqlConnection sqlCon = new SqlConnection(conStr);
                SqlCommand sqlCmd = new SqlCommand("sp_getClinics", sqlCon);
                sqlCmd.CommandType = CommandType.StoredProcedure;

                SqlParameter sp_UserID = sqlCmd.Parameters.Add("@User", SqlDbType.VarChar, 20);
                sp_UserID.Value = (string)Session["User"];

                SqlParameter sp_UserRole = sqlCmd.Parameters.Add("@UserRole", SqlDbType.Char, 1);
                sp_UserRole.Value = (string)Session["Role"];

                SqlDataAdapter sqlDa = new SqlDataAdapter(sqlCmd);
                DataSet dsClinicList = new DataSet();
                sqlDa.Fill(dsClinicList, "ClinicList");
                ddlFilterClinic.DataTextField = "Clinic_Name";
                ddlFilterClinic.DataValueField = "Clinic_ID";
                ddlFilterClinic.DataSource = dsClinicList;
                ddlFilterClinic.DataBind();
                if (dsClinicList.Tables[0].Rows.Count < 2)
                {
                    ddlFilterClinic.Items.RemoveAt(0);
                }
                else
                {
                    ddlFilterFacility.Items.Insert(0, new ListItem("All Locations", "0"));
                    ddlFilterFacility.SelectedIndex = 0;
                }
                ddlFilterClinic.SelectedIndex = 0;
                BindLocation(ddlFilterClinic.SelectedValue);

            }

                GridViewHelper helper = new GridViewHelper(this.gridRxRequestQueue);

                //if ((string)Session["Role"] == "D" || (string)Session["Role"] == "N")

                 if ((string)Session["Role"] == "D")
                 {
                    lblsortby.Visible = false;
                    rbtnShowAll.Visible = false;
                    rbtnFacility.Visible = false;
                    rbtnDoctor.Visible = false;
                    gridRxRequestQueue.Columns[2].Visible = true;
                    gridRxRequestQueue.Columns[4].Visible = false;
                    helper.RegisterGroup("Rx_Date", true, true);

                    ddlStatus.Enabled = false;
                }
                else
                {
                    if (rbtnDoctor.Checked)
                    {
                        helper.RegisterGroup("doctorName", true, true);
                        gridRxRequestQueue.Columns[2].Visible = true;
                        gridRxRequestQueue.Columns[4].Visible = false;

                    }
                    if (rbtnFacility.Checked)
                    {
                        helper.RegisterGroup("Clinic_Name", true, true);
                        helper.RegisterGroup("Facility_Name", true, true);
                        gridRxRequestQueue.Columns[2].Visible = true;
                        gridRxRequestQueue.Columns[4].Visible = true;

                    }

                    if (rbtnShowAll.Checked)
                    {
                        helper.RegisterGroup("Rx_Date", true, true);
                        gridRxRequestQueue.Columns[2].Visible = false;
                        gridRxRequestQueue.Columns[4].Visible = true;

                    }
            }
                Filldata();
                helper.GroupHeader += new GroupEvent(helper_GroupHeader);
                helper.ApplyGroupSort();
        }
        catch (Exception ex)
        {
            objNLog.Error("Error : " + ex.Message);
        }
    }
Exemplo n.º 24
0
        private void caragar_menu_items()
        {
            PerfilObj perfil = new PerfilObj();
            if (perfiles.Length > 0)
            {
                perfil.id = int.Parse( cboxPerfiles.SelectedValue);
            }
            else
            {
                perfil.id = 0;
            }
            BeanMenuPerfil [] lsList = Globales.servicio.obtener_menu_usuario_perfil(perfil);
            contMenuItem = lsList.Length;
            permisoUsuario.DataSource = lsList;
            permisoUsuario.DataBind();

            GridViewHelper helper = new GridViewHelper(this.permisoUsuario);
            helper.RegisterGroup("menuPadre", true, true);
            helper.GroupHeader += new GroupEvent(helper_GroupHeader);
            helper.ApplyGroupSort();
            permisoUsuario.DataBind();
        }
Exemplo n.º 25
0
        public void GroupIt()
        {
            try
            {
                this.gv_ClientDetails.Columns[0].Visible = true;
                this.gv_ClientDetails.Columns[1].Visible = true;
                this.gv_ClientDetails.Columns[2].Visible = true;
                this.gv_ClientDetails.Columns[3].Visible = true;


                helper = new GridViewHelper(this.gv_ClientDetails);

                if (rblGroupBy.SelectedValue.ToString().ToLower() == "suppliername")
                {
                    helper.RegisterGroup("SupplierName", true, true);
                    helper.RegisterGroup("ReportType", true, false);

                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "SupplierName");
                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "ReportType");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "SupplierName");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "ReportType");
                }

                if (rblGroupBy.SelectedValue.ToString().ToLower() == "productcategory")
                {
                    helper.RegisterGroup("ProductCategory", true, true);
                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "ProductCategory");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "ProductCategory");
                }

                if (rblGroupBy.SelectedValue.ToString().ToLower() == "reporttype")
                {
                    helper.RegisterGroup("ReportType", true, true);
                    helper.RegisterSummary("Cases", SummaryOperation.Sum, "ReportType");
                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "ReportType");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "ReportType");
                    //  helper.RegisterSummary("TotalProductWeight", SummaryOperation.Custom);
                }

                if (rblGroupBy.SelectedValue.ToString().ToLower() == "both")
                {
                    helper.RegisterGroup("SupplierName", true, true);
                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "SupplierName");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "SupplierName");

                    helper.RegisterGroup("ProductCategory", true, true);
                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "ProductCategory");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "ProductCategory");

                    helper.RegisterGroup("ReportType", true, true);
                    helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum, "ReportType");
                    helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum, "ReportType");
                }

                helper.RegisterSummary("TotalProductWeight", SummaryOperation.Sum);
                helper.RegisterSummary("TotalProductCost", SummaryOperation.Sum);


                if (rblGroupBy.SelectedValue.ToString().ToLower() == "reporttype")
                {
                    helper.SetInvisibleColumnsWithoutGroupSummary();
                }


                helper.GroupHeader  += new GroupEvent(helper_GroupHeader);
                helper.GroupSummary += new GroupEvent(helper_Bug);

                helper.ApplyGroupSort();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        public void dataload()
        {
            DataTable dt = new DataTable();

            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);

            query = "SELECT ROW_NUMBER() OVER(PARTITION BY a.[RDF_NO] ORDER BY a.[Taluka]) as 'Sr.No',a.[RDF_NO] as 'RIDF',a.[Dist] as 'District',a.[Taluka] as 'Taluka' ,a.[KamacheName] as 'Name of Work',a.[PIC_NO] as 'PIC.No',cast(a.[PrashaskiyAmt] as decimal(18,2)) as 'AA Cost Rs in lakhs',cast(a.[TrantrikAmt] as decimal(18,2)) as 'Ts Cost Rs in lakhs' ,convert(nvarchar(max),a.[TrantrikKrmank])+' '+convert(nvarchar(max),a.[TrantrikDate])as 'Ts No and Date' ,b.[MarchEndingExpn] as 'MarchEndingExpn' ,b.[Tartud] as 'Tartud' ,b.[Magni] as 'Magni' ,b.[Magilkharch] as 'Magilkharch' ,a.[Sadyasthiti] as 'Physical progress of work' ,a.[Pahanikramank] as 'Probable of date of completion' ,a.[PCR] as 'PCR submitted or not' ,a.[Shera] as 'Remark' from BudgetMasterNABARD as a join NABARDProvision as b on a.WorkID=b.WorkID where b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "'";
            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.Text == "संपूर्ण")
                {
                    helper.RegisterGroup("RIDF", true, true);
                    helper.RegisterSummary("AA Cost Rs in lakhs", SummaryOperation.Sum, "RIDF");
                    helper.RegisterSummary("AA Cost Rs in lakhs", SummaryOperation.Sum);
                    helper.RegisterSummary("Ts Cost Rs in lakhs", SummaryOperation.Sum, "RIDF");
                    helper.RegisterSummary("Ts Cost Rs in lakhs", SummaryOperation.Sum);
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "RIDF");
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum, "RIDF");
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                    helper.RegisterSummary("Magni", SummaryOperation.Sum, "RIDF");
                    helper.RegisterSummary("Magni", SummaryOperation.Sum);
                    helper.RegisterSummary("Magilkharch", SummaryOperation.Sum, "RIDF");
                    helper.RegisterSummary("Magilkharch", SummaryOperation.Sum);

                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();
                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterNABARD");
                    foreach (DataRow dr in dt.Rows)
                    {
                        GridView1.DataSource = dt;
                        GridView1.DataBind();
                    }
                }
            }
            else
            {
                helper.RegisterGroup("RIDF", true, true);
                helper.RegisterSummary("AA Cost Rs in lakhs", SummaryOperation.Sum);
                helper.RegisterSummary("Ts Cost Rs in lakhs", SummaryOperation.Sum);
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                helper.RegisterSummary("Magni", SummaryOperation.Sum);
                helper.RegisterSummary("Magilkharch", SummaryOperation.Sum);
                helper.GroupSummary += new GroupEvent(helper_Bug);
                helper.ApplyGroupSort();
                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterNABARD");
                foreach (DataRow dr in dt.Rows)
                {
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                }
            }
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 100 , 100 ,false); </script>", false);
            Session["Report_LekhasirshNabard"] = GridView1;
        }
Exemplo n.º 27
0
        public void dataload()
        {
            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);
            DataTable      dt     = new DataTable();

            if (OrderBy != string.Empty)
            {
                OrderBy = "a.[PageNo] ORDER BY a.[AmdaracheName] ";
            }
            else
            {
                OrderBy = "a.[AmdaracheName] ORDER BY a.[PageNo]";
            }

            query = "SELECT  ROW_NUMBER() OVER(PARTITION BY " + OrderBy + ")as 'अ.क्र',a.[PageNo] as 'प्रकार',a.[AmdaracheName] as 'आमदारांचे नाव',a.[Taluka] as 'तालुका', a.[KamacheName] as 'कामाचे नाव', convert(nvarchar(max),a.[PrashaskiyAmt])as 'एकूण अंदाजित किंमत (अलिकडील सुधारित) प्रशासकीय मान्यता किंमत',convert(nvarchar(max),a.[TrantrikKrmank])+' '+convert(nvarchar(max),a.[TrantrikAmt])+' '+convert(nvarchar(max), a.[TrantrikDate])as 'तांत्रिक मान्यता क्र/रक्कम/दिनांक',convert(nvarchar(max),a.[NividaKrmank])+' '+convert(nvarchar(max),a.[NividaDate]) as 'निविदा क्र.व दिनांक',b.[MarchEndingExpn] as 'MarchEndingExpn',b.[ManjurAmt] as 'ManjurAmt',b.[UrvaritAmt] as 'उर्वरित किंमत',b.[Tartud] as 'Tartud',b.[AkunAnudan] as 'AkunAnudan',b.[Chalukharch] as 'Chalukharch',b.[Magni] as 'Magni', CAST(CASE WHEN a.[Sadyasthiti] = N'प्रगतीत'  THEN 1 ELSE 0 END as decimal(10,2)) as 'प्रगतीत',CAST(CASE WHEN a.[Sadyasthiti] = N'पूर्ण'  THEN 1 ELSE 0 END as decimal(10,2)) as 'पूर्ण', CAST(CASE WHEN a.[Sadyasthiti] = N'निविदा स्तर'  THEN 1 ELSE 0 END as decimal(10,2)) as 'निविदा स्तर',CAST(CASE WHEN a.[Sadyasthiti] = N'अं स्तर'  THEN 1 ELSE 0 END as decimal(10,2)) as 'अं स्तर',a.[Shera] as 'शेरा' FROM BudgetMasterMLA as a join MLAProvision as b on a.Workid=b.Workid where b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "' ";

            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.Text == "संपूर्ण")
                {
                    string[] cols = new string[2];
                    cols[0] = "आमदारांचे नाव";
                    cols[1] = "प्रकार";
                    helper.RegisterGroup(cols, true, true);
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                    helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum);
                    helper.RegisterSummary("उर्वरित किंमत", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("उर्वरित किंमत", SummaryOperation.Sum);
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                    helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum);
                    helper.RegisterSummary("Chalukharch", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("Chalukharch", SummaryOperation.Sum);
                    helper.RegisterSummary("Magni", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("Magni", SummaryOperation.Sum);
                    helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum);
                    helper.RegisterSummary("पूर्ण", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("पूर्ण", SummaryOperation.Sum);
                    helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum);
                    helper.RegisterSummary("अं स्तर", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                    helper.RegisterSummary("अं स्तर", SummaryOperation.Sum);
                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();

                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterMLA");
                }
            }
            else
            {
                string[] cols = new string[2];
                cols[0] = "आमदारांचे नाव";
                cols[1] = "प्रकार";
                helper.RegisterGroup(cols, true, true);
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum);
                helper.RegisterSummary("उर्वरित किंमत", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("उर्वरित किंमत", SummaryOperation.Sum);
                helper.RegisterSummary("Tartud", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum);
                helper.RegisterSummary("Chalukharch", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("Chalukharch", SummaryOperation.Sum);
                helper.RegisterSummary("Magni", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("Magni", SummaryOperation.Sum);
                helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum);
                helper.RegisterSummary("पूर्ण", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("पूर्ण", SummaryOperation.Sum);
                helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum);
                helper.RegisterSummary("अं स्तर", SummaryOperation.Sum, "आमदारांचे नाव+प्रकार");
                helper.RegisterSummary("अं स्तर", SummaryOperation.Sum);

                helper.GroupSummary += new GroupEvent(helper_Bug);
                helper.ApplyGroupSort();

                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterMLA");
            }
            foreach (DataRow dr in dt.Rows)
            {
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 102 , 100 ,false); </script>", false);

            Session["Report_LekhasirshMLA"] = GridView1;
        }
Exemplo n.º 28
0
        public void GroupIt()
        {
            try
            {
                this.gv_ClientDetails.Columns[0].Visible = true;
                this.gv_ClientDetails.Columns[1].Visible = true;
                this.gv_ClientDetails.Columns[2].Visible = true;
                this.gv_ClientDetails.Columns[3].Visible = true;

                helper = new GridViewHelper(this.gv_ClientDetails);
                if (rblReportType.SelectedValue.ToString() == "Detail")
                {
                    helper.RegisterGroup("ClientCity", true, true);
                }
                else
                {
                    helper.SetSuppressGroup("ClientCity");
                }


                helper.RegisterSummary("HouseholdTotal", SummaryOperation.Sum, "ClientCity");

                helper.RegisterSummary("ClientAdult", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("Client65Plus", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("ClientChild", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("ClientNoDOB", SummaryOperation.Sum, "ClientCity");

                helper.RegisterSummary("AFM_Adults", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("AFM_65Plus", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("AFM_Children", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("AFM_NoDOB", SummaryOperation.Sum, "ClientCity");
                helper.RegisterSummary("ClientID", SummaryOperation.Count, "ClientCity");


                helper.RegisterSummary("HouseholdTotal", SummaryOperation.Sum);

                helper.RegisterSummary("ClientAdult", SummaryOperation.Sum);
                helper.RegisterSummary("Client65Plus", SummaryOperation.Sum);
                helper.RegisterSummary("ClientChild", SummaryOperation.Sum);
                helper.RegisterSummary("ClientNoDOB", SummaryOperation.Sum);

                helper.RegisterSummary("AFM_Adults", SummaryOperation.Sum);
                helper.RegisterSummary("AFM_65Plus", SummaryOperation.Sum);
                helper.RegisterSummary("AFM_Children", SummaryOperation.Sum);
                helper.RegisterSummary("AFM_NoDOB", SummaryOperation.Sum);
                helper.RegisterSummary("ClientID", SummaryOperation.Count);


                // helper.RegisterGroup("ClientZipCode", true, true);
                helper.GroupHeader  += new GroupEvent(helper_GroupHeader);
                helper.GroupSummary += new GroupEvent(helper_Bug);

                if (rblReportType.SelectedValue.ToString() == "Summary")
                {
                    helper.SetInvisibleColumnsWithoutGroupSummary();
                }
                else
                {
                    // DO NOTHING
                }

                helper.ApplyGroupSort();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        public void dataload()
        {
            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);
            DataTable      dt     = new DataTable();

            if (OrderBy != string.Empty)
            {
                OrderBy = "[Upvibhag]asc";
            }
            else
            {
                OrderBy = "[SubType]";
            }
            query = "SELECT ROW_NUMBER() OVER(PARTITION BY [lekhashirsh] ORDER BY [SubType]) as 'SrNo',a.[SubType] ,a.[LekhaShirsh] as 'lekhashirsh',a.[LekhaShirshName] as 'LekhaShirshName',  a.[KamacheName] as kamachenaav,convert(nvarchar(max),a.[PrashaskiyAmt])+' '+convert(nvarchar(max),a.[PrashaskiyDate])as prashaskiy,convert(nvarchar(max),a.[TrantrikAmt])+' '+convert(nvarchar(max), a.[TrantrikDate]) as tantrik,a.[ThekedaarName] as thename,convert(nvarchar(max),a.[NividaKrmank]) +' '+convert(nvarchar(max),a.[NividaDate])as karyarambhadesh,a.[NividaAmt] as nivamt,a.[kamachiMudat] +' month' as kammudat,b.[MarchEndingExpn] as marchexpn,b.[Tartud] as tartud,b.[AkunAnudan] as akndan,b.[Magilkharch] as magch,b.[Chalukharch] as chalch,b.[AikunKharch] as aknkharch,CAST(CASE WHEN MudatVadhiDate = ' ' or MudatVadhiDate = '0' THEN N'होय' ELSE N'नाही' END as nvarchar(max)) as mudatvadh,[Vidyutprama] as vidprama,b.[Vidyutvitarit] as vidtarit,b.[Dviguni] as dvini, a.[Pahanikramank] as pankr,convert(nvarchar(max),a.[Sadyasthiti])+' '+convert(nvarchar(max),a.[Shera]) as shera, N'उपविभागीय अभियंता'+' '+convert(nvarchar(max),a.[UpabhyantaName])+' '+convert(nvarchar(max),a.[UpAbhiyantaMobile]) +N' शा.अ.- '+convert(nvarchar(max),a.[ShakhaAbhyantaName])+' '+convert(nvarchar(max),a.[ShakhaAbhiyantMobile]) as abhiyanta from [BudgetMaster2515] as a join [2515Provision] as b on a.WorkID=b.WorkID where b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "' ";

            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.SelectedItem.Text == "संपूर्ण")
                {
                    string[] cols = new string[2];
                    cols[0] = "LekhaShirshName";
                    cols[1] = "lekhashirsh";

                    helper.RegisterGroup(cols, true, true);
                    helper.RegisterSummary("vidtarit", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("vidtarit", SummaryOperation.Sum);
                    helper.RegisterSummary("vidprama", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("vidprama", SummaryOperation.Sum);
                    helper.RegisterSummary("aknkharch", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("aknkharch", SummaryOperation.Sum);
                    helper.RegisterSummary("chalch", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("chalch", SummaryOperation.Sum);
                    helper.RegisterSummary("magch", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("magch", SummaryOperation.Sum);
                    helper.RegisterSummary("akndan", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("akndan", SummaryOperation.Sum);
                    helper.RegisterSummary("tartud", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("tartud", SummaryOperation.Sum);
                    helper.RegisterSummary("marchexpn", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("marchexpn", SummaryOperation.Sum);
                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();

                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMaster2515");
                }
            }
            else
            {
                string[] cols = new string[2];
                cols[0] = "LekhaShirshName";
                cols[1] = "lekhashirsh";
                helper.RegisterGroup(cols, true, true);
                helper.RegisterSummary("vidtarit", SummaryOperation.Sum);
                helper.RegisterSummary("vidprama", SummaryOperation.Sum);
                helper.RegisterSummary("aknkharch", SummaryOperation.Sum);
                helper.RegisterSummary("chalch", SummaryOperation.Sum);
                helper.RegisterSummary("magch", SummaryOperation.Sum);
                helper.RegisterSummary("akndan", SummaryOperation.Sum);
                helper.RegisterSummary("tartud", SummaryOperation.Sum);
                helper.RegisterSummary("marchexpn", SummaryOperation.Sum);
                helper.GroupSummary += new GroupEvent(helper_Bug);
                helper.ApplyGroupSort();
                //ObjMPRGridBind.MPRBindGrid() Method Of MasterReportGridBind Class
                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMaster2515");
            }
            foreach (DataRow dr in dt.Rows)
            {
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 100 , 100 ,false); </script>", false);
            Session["Lekhasirsh2515Rpt"] = GridView1;
        }
Exemplo n.º 30
0
        private void Filtering(string _el1, string _el2, string _el3, string _el4)
        {
            if (_el1 == "")
            {
                _el1 = "All";
            }
            if (_el2 == "")
            {
                _el2 = "All";
            }
            if (_el3 == "")
            {
                _el3 = "All";
            }
            if (_el4 == "")
            {
                _el4 = "All";
            }
            _dtfilter = _dtMaster;
            DataTable _dtresult = new DataTable();

            _dtresult.Columns.Add("e_b_ref", typeof(string));
            _dtresult.Columns.Add("B_Z", typeof(string));
            _dtresult.Columns.Add("Cat", typeof(string));
            _dtresult.Columns.Add("F_lvl", typeof(string));
            _dtresult.Columns.Add("Sq_No", typeof(string));
            _dtresult.Columns.Add("Loc", typeof(string));
            _dtresult.Columns.Add("P_P_to", typeof(string));
            _dtresult.Columns.Add("F_from", typeof(string));
            _dtresult.Columns.Add("Substation", typeof(string));
            _dtresult.Columns.Add("devices1", typeof(string));
            _dtresult.Columns.Add("C_id", typeof(int));
            _dtresult.Columns.Add("Sys_name", typeof(string));
            _dtresult.Columns.Add("Sys_id", typeof(int));
            var _filter = from o in _dtfilter.AsEnumerable()
                          select o;

            if (_el1 == "All" && _el2 == "All" && _el3 == "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          select o;
            }
            else if (_el1 != "All" && _el2 == "All" && _el3 == "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("B_Z") == _el1
                          select o;
            }
            else if (_el1 != "All" && _el2 != "All" && _el3 == "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("B_Z") == _el1 && o.Field <string>("Cat") == _el2
                          select o;
            }
            else if (_el1 != "All" && _el2 != "All" && _el3 != "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("B_Z") == _el1 && o.Field <string>("Cat") == _el2 && o.Field <string>("F_lvl") == _el3 select o;
            }
            else if (_el1 != "All" && _el2 != "All" && _el3 != "All" && _el4 != "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("B_Z") == _el1 && o.Field <string>("Cat") == _el2 && o.Field <string>("F_lvl") == _el3 && o.Field <string>("F_from") == _el4
                          select o;
            }
            else if (_el1 == "All" && _el2 != "All" && _el3 == "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("Cat") == _el2
                          select o;
            }
            else if (_el1 == "All" && _el2 != "All" && _el3 != "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("Cat") == _el2 && o.Field <string>("F_lvl") == _el3
                          select o;
            }
            else if (_el1 == "All" && _el2 != "All" && _el3 != "All" && _el4 != "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("Cat") == _el2 && o.Field <string>("F_lvl") == _el3 && o.Field <string>("F_from") == _el4
                          select o;
            }
            else if (_el1 == "All" && _el2 == "All" && _el3 != "All" && _el4 == "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("F_lvl") == _el3
                          select o;
            }
            else if (_el1 == "All" && _el2 == "All" && _el3 != "All" && _el4 != "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("F_lvl") == _el3 && o.Field <string>("F_from") == _el4
                          select o;
            }
            else if (_el1 == "All" && _el2 == "All" && _el3 == "All" && _el4 != "All")
            {
                _filter = from o in _dtfilter.AsEnumerable()
                          where o.Field <string>("F_from") == _el4
                          select o;
            }
            foreach (var row in _filter)
            {
                DataRow _row = _dtresult.NewRow();
                _row[0]  = row["e_b_ref"].ToString();
                _row[1]  = row["B_Z"].ToString();
                _row[2]  = row["Cat"].ToString();
                _row[3]  = row["F_lvl"].ToString();
                _row[4]  = row["Seq_No"].ToString();
                _row[5]  = row["Loc"].ToString();
                _row[6]  = row["p_p_to"].ToString();
                _row[7]  = row["F_from"].ToString();
                _row[8]  = row["Substation"].ToString();
                _row[9]  = row["devices1"].ToString();
                _row[10] = row["C_id"].ToString();
                _row[11] = row["Sys_name"].ToString();
                _row[12] = row["Sys_id"].ToString();
                _dtresult.Rows.Add(_row);
            }
            mygrid.DataSource = _dtresult;
            mygrid.DataBind();
            GridViewHelper _help = new GridViewHelper(mygrid);

            _help.RegisterGroup("Sys_name", true, true);
            _help.GroupHeader += new GroupEvent(helper_GroupHeader);
            _help.ApplyGroupSort();
        }
Exemplo n.º 31
0
        public void dataload()
        {
            DataTable dt = new DataTable();

            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);

            query = "SELECT ROW_NUMBER() OVER(PARTITION BY [lekhashirsh] ORDER BY [SubType]) as 'SrNo',a.[LekhaShirsh] as 'lekhashirsh',a.[LekhaShirshName] as 'LekhaShirshName',a.[Dist] as dist,a.[Upvibhag] as upvibhag,cast(a.[ForDepartment] as decimal(10,2))as Sasnanenemundilele,cast(a.[DepartmentDecided] as decimal(10,2)) as Pradeshikvibhag,a.[FromAccident]as pasun,a.[AccidentExecuted] as pryant,a.[KamacheName] as kamachenav,a.[Kamachevav]as varnan,a.AccidentKaryvahi as ApghatKaryvahi,b.VidyutikaranAmt as kamachikinmat,a.Sadyasthiti as sadyastiti,b.VidyutikaranExpen as zalelakhrch,b.Magni as nidhi,a.Shera as shera  from [BudgetMasterGAT_D] as a join [GAT_DProvision] as b on a.WorkID=b.WorkID where b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "' and a.[Type]=N'GAT_D'";

            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.Text == "संपूर्ण")
                {
                    string[] cols = new string[2];
                    cols[0] = "LekhaShirshName";
                    cols[1] = "lekhashirsh";
                    helper.RegisterGroup(cols, true, true);
                    helper.RegisterSummary("nidhi", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("nidhi", SummaryOperation.Sum);
                    helper.RegisterSummary("zalelakhrch", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("zalelakhrch", SummaryOperation.Sum);
                    helper.RegisterSummary("kamachikinmat", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("kamachikinmat", SummaryOperation.Sum);
                    helper.RegisterSummary("Pradeshikvibhag", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("Pradeshikvibhag", SummaryOperation.Sum);
                    helper.RegisterSummary("Sasnanenemundilele", SummaryOperation.Sum, "LekhaShirshName+lekhashirsh");
                    helper.RegisterSummary("Sasnanenemundilele", SummaryOperation.Sum);
                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();
                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterGAT_D");
                    foreach (DataRow dr in dt.Rows)
                    {
                        GridView1.DataSource = dt;
                        GridView1.DataBind();
                    }
                }
            }
            else
            {
                string[] cols = new string[2];
                cols[0] = "lekhashirsh";
                cols[1] = "LekhaShirshName";
                helper.RegisterGroup(cols, true, true);

                helper.RegisterSummary("nidhi", SummaryOperation.Sum);
                helper.RegisterSummary("zalelakhrch", SummaryOperation.Sum);
                helper.RegisterSummary("kamachikinmat", SummaryOperation.Sum);
                helper.RegisterSummary("Pradeshikvibhag", SummaryOperation.Sum);
                helper.RegisterSummary("Sasnanenemundilele", SummaryOperation.Sum);
                helper.GroupSummary += new GroupEvent(helper_Bug);
                helper.ApplyGroupSort();
                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterGAT_D");
                foreach (DataRow dr in dt.Rows)
                {
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                }
            }
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 100 , 100 ,false); </script>", false);
            Session["LekhasirshGAT_DRpt"] = GridView1;
        }
        public void dataload()
        {
            lekha();
            if (pri != "print")
            {
                nullgridview();
            }
            GridViewHelper helper = new GridViewHelper(this.GridView1);
            DataTable      dt     = new DataTable();

            if (OrderBy != string.Empty)
            {
                OrderBy = "a.[Taluka]asc";
            }
            else
            {
                OrderBy = "[SubType]";
            }
            query = "SELECT ROW_NUMBER() OVER(PARTITION BY a.[Taluka] ORDER BY a.[WorkId]) as 'अ.क्र',a.[Arthsankalpiyyear] as 'अर्थसंकल्पीय वर्ष',a.[Taluka] as 'तालुका',a.[LekhaShirsh] as 'योजनेचे नाव',b.[ComputerCRC] as 'सीआरसी (संगणक) संकेतांक', b.[ObjectCode] as 'उद्यीष्ट संकेतांक(ऑब्जेक्ट कोड)',a.[KamacheName] as 'योजनेचे / कामाचे नांव',  b.[ManjurAmt] as 'एकूण अंदाजित किंमत',convert(nvarchar(max),a.[NividaAmt])+' '+ convert(nvarchar(max),b.[MudatVadhiDate]) as 'सुधारित अंदाजित किंमतीचा दिनांक', b.[MarchEndingExpn] as 'MarchEndingExpn',b.[ManjurAmt] as 'ManjurAmt',b.[UrvaritAmt] as 'UrvaritAmt', b.[Tartud] as 'Tartud',a.[KamPurnDate] as 'काम पूर्ण होण्याचा अपेक्षित दिनांक', b.[Tartud]as 'Tartud',b.[AkunAnudan] as 'AkunAnudan', b.[Magilkharch] as 'Magilkharch',b.[Magni] as 'Magni',CAST(CASE WHEN a.[Sadyasthiti] = 'Completed'  THEN 1 ELSE 0 END as decimal(10,2)) as 'पुर्ण', CAST(CASE WHEN a.[Sadyasthiti] = 'Processing'  THEN 1 ELSE 0 END as decimal(10,2)) as 'प्रगतीत', CAST(CASE WHEN a.[Sadyasthiti] = 'Not Started'  THEN 1 ELSE 0 END as decimal(10,2)) as 'निविदा स्तर',a.[Shera] as 'शेरा' FROM BudgetMasterDPDC as a join DPDCProvision as b on a.Workid=b.Workid where  b.Arthsankalpiyyear='" + ddlArthYear.SelectedItem.Text + "' ";

            if (Btnkam == "संपूर्ण")
            {
                if (ddlReportType.SelectedItem.Text == "संपूर्ण" || ddlkamacheYear.SelectedItem.Text == "संपूर्ण")
                {
                    string[] cols = new string[2];
                    cols[0] = "अर्थसंकल्पीय वर्ष";
                    cols[1] = "तालुका";
                    helper.RegisterGroup(cols, true, true);

                    helper.RegisterSummary("एकूण अंदाजित किंमत", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("एकूण अंदाजित किंमत", SummaryOperation.Sum);
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                    helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum);
                    helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum);
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                    helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum);
                    helper.RegisterSummary("Magilkharch", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("Magilkharch", SummaryOperation.Sum);
                    helper.RegisterSummary("Magni", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("Magni", SummaryOperation.Sum);
                    helper.RegisterSummary("पुर्ण", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("पुर्ण", SummaryOperation.Sum);
                    helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum);
                    helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                    helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum);
                    helper.GroupSummary += new GroupEvent(helper_Bug);
                    helper.ApplyGroupSort();
                    //ObjMPRGridBind.MPRBindGrid() Method Of MasterReportGridBind Class
                    dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterDPDC");
                }
            }
            else
            {
                string[] cols = new string[2];
                cols[0] = "अर्थसंकल्पीय वर्ष";
                cols[1] = "तालुका";
                helper.RegisterGroup(cols, true, true);

                helper.RegisterSummary("एकूण अंदाजित किंमत", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("एकूण अंदाजित किंमत", SummaryOperation.Sum);
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("MarchEndingExpn", SummaryOperation.Sum);
                helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("ManjurAmt", SummaryOperation.Sum);
                helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("UrvaritAmt", SummaryOperation.Sum);
                helper.RegisterSummary("Tartud", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                helper.RegisterSummary("Tartud", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("Tartud", SummaryOperation.Sum);
                helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("AkunAnudan", SummaryOperation.Sum);
                helper.RegisterSummary("Magilkharch", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("Magilkharch", SummaryOperation.Sum);
                helper.RegisterSummary("Magni", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("Magni", SummaryOperation.Sum);
                helper.RegisterSummary("पुर्ण", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("पुर्ण", SummaryOperation.Sum);
                helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("प्रगतीत", SummaryOperation.Sum);
                helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum, "अर्थसंकल्पीय वर्ष+तालुका");
                helper.RegisterSummary("निविदा स्तर", SummaryOperation.Sum);
                helper.GroupSummary += new GroupEvent(helper_Bug);
                helper.ApplyGroupSort();
                //ObjMPRGridBind.MPRBindGrid() Method Of MasterReportGridBind Class
                dt = ObjMPRGridBind.MPRBindGrid(ddlkamacheYear.Text, ddlReportType.Text, whereColumn, WhereColumnValue, query, "BudgetMasterDPDC");
            }
            foreach (DataRow dr in dt.Rows)
            {
                GridView1.DataSource = dt;
                GridView1.DataBind();
            }
            ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "<script>MakeStaticHeader('" + GridView1.ClientID + "', 750, 101 , 100 ,false); </script>", false);

            Session["LekhasirshDPDCRpt"] = GridView1;
        }