//private bool _haveNewOrder = false; protected void Page_Load(object sender, EventArgs e) { // add summary GridViewHelper helper = new GridViewHelper(this.lstOrders); helper.RegisterSummary("actualAmount", SummaryOperation.Sum); helper.RegisterSummary("agentCmt", SummaryOperation.Sum); helper.RegisterSummary("agentCredit", SummaryOperation.Sum); helper.RegisterSummary("agentBillAmount", SummaryOperation.Sum); helper.RegisterSummary("balance", SummaryOperation.Sum); helper.GeneralSummary += new FooterEvent(helper_SummaryFooter); if (!Page.IsPostBack) { int agentID = PageTools.GetSavedId("AgentID", Request.QueryString["agent"]); if (agentID <= 0) Response.Redirect("AgentReceivables.aspx"); else { OrdersDataset.SelectParameters["agentID"].DefaultValue = agentID.ToString(); lstOrders.DataBind(); AgentDataset.SelectParameters["agentID"].DefaultValue = agentID.ToString(); fvAgent.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { helper = new GridViewHelper(this.gvData, false); // Export the details of specified columns try { if (Session["oExportQuery"] != null && Convert.ToString(Session["oExportQuery"]) != "") { strQuery = Convert.ToString(Session["oExportQuery"]); dtData = objQueryConroller.ExecuteQuery(strQuery); string[] cols = { "Model" }; helper.RegisterGroup(cols, true, true); helper.GroupHeader += helper_GroupHeader; gvData.DataSource = dtData; gvData.DataBind(); Session["oExportQuery"] = null; btnExport_Click(sender, e); // Call the Export Data... } } catch { } }
protected void Page_Load(object sender, EventArgs e) { GridViewHelper helper = new GridViewHelper(this.lstAgentOrders); helper.RegisterSummary("agentReceivable", SummaryOperation.Sum); helper.RegisterSummary("additionalDiscount", SummaryOperation.Sum); helper.RegisterSummary("agentPaid", SummaryOperation.Sum); }
protected void Page_Load(object sender, EventArgs e) { GridViewHelper helper = new GridViewHelper(this.lstInvoice); helper.RegisterSummary("amount", SummaryOperation.Sum); helper.RegisterSummary("commission", SummaryOperation.Sum); helper.RegisterSummary("nettotal", SummaryOperation.Sum); helper.RegisterSummary("payAmount", SummaryOperation.Sum); helper.RegisterSummary("balance", SummaryOperation.Sum); helper.GeneralSummary += new FooterEvent(helper_footerEvent); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) txtFromDate.Text = DateTime.Now.ToShortDateString(); GridViewHelper helper = new GridViewHelper(this.gvReport, true); helper.RegisterSummary("TonDau", SummaryOperation.Sum); helper.RegisterSummary("Nhap", SummaryOperation.Sum); helper.RegisterSummary("Xuat", SummaryOperation.Sum); helper.RegisterSummary("TonCuoi", SummaryOperation.Sum); }
public void BindGrid() { DataTable dtCost = getTable(); if (dtCost != null) { if (dtCost.Rows.Count > 0) { btnExport.Visible = true; grdCostReport.DataSource = dtCost; BoundField bnd = new BoundField(); bnd.DataField = "Field"; bnd.HeaderText = "Model"; grdCostReport.Columns.Add(bnd); string strQuarterQuery = "Select distinct Quarter from vw_QuarterWiseBudgetCost"; DataTable dtQuarter = objQueryController.ExecuteQuery(strQuarterQuery); if (dtQuarter != null) { if (dtQuarter.Rows.Count > 0) { foreach (DataRow drQuarter in dtQuarter.Rows) { BoundField bndf = new BoundField(); bndf.DataField = drQuarter["Quarter"].ToString(); bndf.HeaderText = drQuarter["Quarter"].ToString(); grdCostReport.Columns.Add(bndf); } } } strGroup = "ModelGroupName"; helper = new GridViewHelper(this.grdCostReport, false); string[] cols = new string[1]; cols[0] = strGroup; helper.RegisterGroup(cols, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); grdCostReport.DataBind(); } else { btnExport.Visible = false; grdCostReport.DataSource = null; grdCostReport.DataBind(); } } else { btnExport.Visible = false; grdCostReport.DataSource = null; grdCostReport.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { dateFrom.DateValue = PageTools.GetSavedDate("FromDate", DateTime.Now.ToShortDateString()); dateTo.DateValue = PageTools.GetSavedDate("ToDate", DateTime.Now.ToShortDateString()); } GridViewHelper helper = new GridViewHelper(this.lstReport); helper.RegisterSummary("cash", SummaryOperation.Sum); helper.RegisterSummary("creditCard", SummaryOperation.Sum); helper.RegisterSummary("check", SummaryOperation.Sum); helper.RegisterSummary("agent", SummaryOperation.Sum); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DateTime dt = PageTools.GetSavedDate("ReportDate", null); if (dt.Year < 2005) dt = DateTime.Now; dateFrom.DateValue = PageTools.GetSavedDate("ReportDate", dt.ToShortDateString()); lstReport.DataBind(); } GridViewHelper helper = new GridViewHelper(this.lstReport); helper.RegisterSummary("cash", SummaryOperation.Sum); helper.RegisterSummary("creditCard", SummaryOperation.Sum); helper.RegisterSummary("check", SummaryOperation.Sum); helper.RegisterSummary("agent", SummaryOperation.Sum); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { dateFrom.DateValue = PageTools.GetSavedDate("FromDate", null); dateTo.DateValue = PageTools.GetSavedDate("ToDate", null); int employeeID = PageTools.ParseInt(Request.QueryString["id"]); if (employeeID>0) { EmployeeBiz biz = new EmployeeBiz(); lbEmployeeName.Text = biz.GetEmployeeName(employeeID); } } GridViewHelper helper = new GridViewHelper(this.lstReport); helper.RegisterSummary("amount", SummaryOperation.Sum); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AgentOrderBiz biz = new AgentOrderBiz(); DataSet ds = biz.GetAgentRecvInvoice(PageTools.ParseInt(Request.QueryString["recv"])); if (ds != null) { AgentInfoCtl1.AgentID = PageTools.GetSavedId("agentID", ds.Tables[0].Rows[0]["agentID"].ToString()); lnkPrint.NavigateUrl = "AgentRecvInvoice_prn.aspx?recv=" + Request.QueryString["recv"]; lnkAgentOrders.NavigateUrl = "AgentOrders.aspx"; } } // add summary GridViewHelper helper = new GridViewHelper(this.lstPayment); //helper.RegisterGroup("orderID", true, true); //helper.GroupHeader += new GroupEvent(helper_GroupHeader); //helper.ApplyGroupSort(); helper.RegisterSummary("payAmount", SummaryOperation.Sum); helper.GeneralSummary += new FooterEvent(helper_SummaryFooter); }
public void getACRDetail() { if (dtGridData != null) { if (dtGridData.Rows.Count > 0) { strGroup = "Model"; grdacrData.Visible = true; grdacrData.DataSource = dtGridData; helper = new GridViewHelper(this.grdacrData, false); string[] cols = new string[1]; cols[0] = strGroup; helper.RegisterGroup(cols, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); helper.RegisterSummary("Value", SummaryOperation.Sum, strGroup); helper.RegisterSummary("Quantity", SummaryOperation.Sum, strGroup); helper.GroupSummary += new GroupEvent(helper_GroupSummary); grdacrData.DataBind(); btnPrint.Visible = true; btnExport.Visible = true; } else { grdacrData.DataSource =null; grdacrData.DataBind(); btnPrint.Visible = false; btnExport.Visible = false; } } else { grdacrData.DataSource = null; grdacrData.DataBind(); btnPrint.Visible = false; btnExport.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["User"] == null || Session["Role"] == null) Response.Redirect("../Login.aspx"); GridViewHelper helper = new GridViewHelper(this.gridRxSampleList); string[] group = { "DoctorName", "PatientName" }; helper.RegisterGroup(group, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); Filldata(); } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } }
private void BtnDown_Click(object sender, EventArgs e) { GridViewHelper.MoveRow(gridView1, DevMoveState.next); this.SetOrder(); }
protected void gridView_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridViewColumnDisplayTextEventArgs e) { GridViewHelper.gridView_CustomColumnDisplayText(sender, e, schemaInfo.App.GridTextColumnMaxLength); }
private void OperationCtrl_Load(object sender, EventArgs e) { InitUIResourcesByCulture(); BindTreeView(); GridViewHelper.SetGridView(operationView); }
private void LoadDocuments() { GridViewHelper.LoadGVColumns <IClassifiedDocument>(ExtractedDocsDataGridView); SetCountOfFieldsExtracted(); GridViewHelper.LoadListObjectsToGridview(ExtractedDocsDataGridView, FieldExtractedDocs); }
public void grdacrData_Paging(Object sender, GridViewPageEventArgs e) { grdacrData.PageIndex = e.NewPageIndex; strGroup = "Model"; grdacrData.Visible = true; grdacrData.DataSource = dtGridData; helper = new GridViewHelper(this.grdacrData, false); string[] cols = new string[1]; cols[0] = strGroup; helper.RegisterGroup(cols, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); helper.RegisterSummary("Value", SummaryOperation.Sum, strGroup); helper.RegisterSummary("Quantity", SummaryOperation.Sum, strGroup); helper.GroupSummary += new GroupEvent(helper_GroupSummary); grdacrData.DataBind(); if (grdacrData != null) { if (grdacrData.Rows.Count > 0) { btnPrint.Visible = true; btnExport.Visible = true; } else { btnPrint.Visible = false; btnExport.Visible = false; } } else { btnPrint.Visible = false; btnExport.Visible = false; } }
private void InitGrid2() { #region 初始化列 this.gridView1.Columns.Clear(); this.gridView1.OptionsView.AllowCellMerge = true; GridColumn col = GridViewHelper.AddColumn(this.gridView1, "cInvAddCode", "老编码", 120); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col.Summary.Add(DevExpress.Data.SummaryItemType.Count); col.Summary[0].DisplayFormat = "记录:{0}"; col.Summary[0].FieldName = "cInvAddCode"; col = GridViewHelper.AddColumn(this.gridView1, "cInvDefine9", "客户名称", 150); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "InvCode", "存货编码", 130); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvName", "存货名称", 130); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvStd", "规格型号", 120); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "dubie", "镀别", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "Free1", "头标", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "KCQuantity", "库存仓库", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.AppearanceCell.ForeColor = Color.Blue; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "ZZQuantity", "在制品", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.AppearanceCell.ForeColor = Color.Blue; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "NStockQty", "完工未入库", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.AppearanceCell.ForeColor = Color.Blue; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "cusQuantity", "客户仓库", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.AppearanceCell.ForeColor = Color.Blue; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "PreQty", "预测数量", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "AvgQty", "月平均", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "dDate", "最近发货日期", 120); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime; #endregion }
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); } }
/*******************************Exporting Record Into Excel*****************************************/ protected void Button1_Click(object sender, EventArgs e) { GridViewExport objExport = new GridViewExport(); //objExport.ExportGridView(hdnExport.Value); grdacrData.ShowFooter = false; grdacrData.AllowPaging = false; grdacrData.AllowSorting = false; strGroup = "Model"; grdacrData.Visible = true; grdacrData.PageIndex = 0; grdacrData.DataSource = dtGridData; helper = new GridViewHelper(this.grdacrData, false); string[] cols = new string[1]; cols[0] = strGroup; helper.RegisterGroup(cols, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); helper.RegisterSummary("Value", SummaryOperation.Sum, strGroup); helper.RegisterSummary("Quantity", SummaryOperation.Sum, strGroup); helper.GroupSummary += new GroupEvent(helper_GroupSummary); grdacrData.DataBind(); PrepareGridViewForExport(grdacrData); ExportGridView(); }
private void BtnExport_Click(object sender, EventArgs e) { GridViewHelper.ExportToXlsx(gridControl1); }
public ReturnMaterialQueryCtrl() { InitializeComponent(); InitializeLanguage(); GridViewHelper.SetGridView(gridView1); }
private void InitGrid() { #region 初始化列 this.gridView1.OptionsView.AllowCellMerge = true; GridColumn col = GridViewHelper.AddColumn(this.gridView1, "MoCode", "生产订单号", 100); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "SortSeq", "行号", 50); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cSOCode", "销售订单", 100); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cCusInvCode", "客户零件号", 120); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvCode", "存货编码", 150); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvName", "存货名称", 150); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvStd", "规格型号", 120); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "dubie", "镀别", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "Free1", "头标", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "orderQty", "生产订单千件", 90); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col = GridViewHelper.AddColumn(this.gridView1, "OpSeq", "工序序号", 70); col = GridViewHelper.AddColumn(this.gridView1, "OPName", "工序名称", 70); col = GridViewHelper.AddColumn(this.gridView1, "iQuantity", "已报工千件", 80); col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "iWeight", "已报工重量", 90); col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col = GridViewHelper.AddColumn(this.gridView1, "LQty", "工序剩余/千件", 90); //col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "LWeight", "工序剩余/Kg", 90); //col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col = GridViewHelper.AddColumn(this.gridView1, "LQty2", "订单剩余/千件", 90); col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n3}"; col = GridViewHelper.AddColumn(this.gridView1, "repPercent", "完成率", 70); col.AppearanceCell.ForeColor = Color.Blue; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}%"; //GridViewHelper.AddColumn(this.gridView1, "Remark", "备注", 150); #endregion }
/// <summary> /// 构造函数。 /// </summary> public MaterialBuckleControlCtrl() { InitializeComponent(); InitializeLanguage(); GridViewHelper.SetGridView(gridViewCode); }
/// <summary> /// 添加新记录 /// </summary> public override string Save() { string result = "0"; string _id = GridViewHelper.GetSelectedKey(Grid1, true); int id = ConvertHelper.Cint0(_id); try { #region 数据验证 var sPROD_ID = PROD_ID.Text.Trim(); if (string.IsNullOrEmpty(PROD_ID.Text.Trim())) { PROD_ID.ShowRedStar = true; return(PROD_ID.Label + "不能为空!"); } if (string.IsNullOrEmpty(PROD_NAME1.Text.Trim())) { return(PROD_NAME1.Label + "不能为空!"); } var sPROD_KIND = PROD_KIND.SelectedValue; if (string.IsNullOrEmpty(sPROD_KIND) || sPROD_KIND == "0") { return(PROD_KIND.Label + "不能为空!"); } var sPROD_DEP = PROD_DEP.SelectedValue; if (string.IsNullOrEmpty(sPROD_DEP) || sPROD_DEP == "0") { return(PROD_DEP.Label + "不能为空!"); } var sPROD_TYPE = PROD_TYPE.SelectedValue; if (string.IsNullOrEmpty(sPROD_DEP)) { return(PROD_TYPE.Label + "不能为空!"); } var sPROD_Source = PROD_Source.SelectedValue; if (string.IsNullOrEmpty(sPROD_Source)) { return(PROD_Source.Label + "不能为空!"); } var sINV_TYPE = INV_TYPE.SelectedValue; if (string.IsNullOrEmpty(sINV_TYPE) || sINV_TYPE == "0") { return(INV_TYPE.Label + "不能为空!"); } var sSTOCK_TYPE = STOCK_TYPE.SelectedValue; if (string.IsNullOrEmpty(sSTOCK_TYPE) || sSTOCK_TYPE == "0") { return(STOCK_TYPE.Label + "不能为空!"); } var sBOM_TYPE = BOM_TYPE.SelectedValue; if (string.IsNullOrEmpty(sBOM_TYPE) || sBOM_TYPE == "0") { return(BOM_TYPE.Label + "不能为空!"); } var sMarginControl = MarginControl.SelectedValue; if (string.IsNullOrEmpty(sMarginControl) || sMarginControl == "0") { return(MarginControl.Label + "不能为空!"); } var sPROD_RangTYPE = PROD_RangTYPE.SelectedValue; if (string.IsNullOrEmpty(sPROD_RangTYPE) || sPROD_RangTYPE == "0") { return(PROD_RangTYPE.Label + "不能为空!"); } var sPROD_iRang = PROD_iRang.Text; if (string.IsNullOrEmpty(sPROD_iRang)) { return(PROD_iRang.Label + "不能为空!"); } if (!ConvertHelper.IsInt(sPROD_iRang)) { return(PROD_iRang.Label + "必须为整数"); } var sPROD_UNIT = PROD_UNIT.SelectedValue; if (string.IsNullOrEmpty(sPROD_UNIT) || sPROD_UNIT == "0") { return(PROD_UNIT.Label + "不能为空!"); } var sPROD_CONVERT1 = PROD_CONVERT1.Text; if (string.IsNullOrEmpty(sPROD_CONVERT1)) { return(PROD_CONVERT1.Label + "不能为空!"); } if (!ConvertHelper.IsInt(sPROD_CONVERT1)) { return(PROD_CONVERT1.Label + "必须为整数!"); } var sPROD_UNIT1 = PROD_UNIT1.SelectedValue; if (string.IsNullOrEmpty(sPROD_UNIT1) || sPROD_UNIT1 == "0") { return("包装单位不能为空!"); } var sPROD_CONVERT2 = PROD_CONVERT2.Text; if (string.IsNullOrEmpty(sPROD_CONVERT2)) { return(PROD_CONVERT2.Label + "不能为空!"); } if (!ConvertHelper.IsInt(sPROD_CONVERT2)) { return(PROD_CONVERT2.Label + "必须为整数!"); } var sPROD_UNIT2 = PROD_UNIT2.SelectedValue; if (string.IsNullOrEmpty(sPROD_UNIT2) || sPROD_UNIT2 == "0") { return("外箱单位不能为空!"); } var sReport_UNIT = Report_UNIT.SelectedValue; if (string.IsNullOrEmpty(sReport_UNIT) || sReport_UNIT == "0") { return(Report_UNIT.Label + "不能为空!"); } sPROD_ID = StringHelper.Left(sPROD_ID, 50); if (PRODUCT00Bll.GetInstence().Exist(x => x.PROD_ID == sPROD_ID)) { return(PROD_ID.Label + "已存在!请重新输入!"); } string sPROD_NAME1 = StringHelper.Left(PROD_NAME1.Text.Trim(), 50); if (PRODUCT00Bll.GetInstence().Exist(x => x.PROD_ID == sPROD_NAME1)) { return(PROD_NAME1.Label + "已存在!请重新输入!"); } #endregion #region 赋值 var model = new PRODUCT00(x => x.Id == id); var OlUser = OnlineUsersBll.GetInstence().GetModelForCache(x => x.UserHashKey == Session[OnlineUsersTable.UserHashKey].ToString()); if (model.PROD_ID == sPROD_ID) { //model.SetIsNew(false); } else { model.SetIsNew(true); } model.PROD_ID = sPROD_ID; model.PROD_NAME1 = PROD_NAME1.Text; model.PROD_NAME1_SPELLING = PROD_NAME1_SPELLING.Text; model.PROD_NAME2 = PROD_NAME2.Text; model.PROD_KIND = sPROD_KIND; model.PROD_DEP = sPROD_DEP; model.PROD_CATE = PROD_CATE.SelectedValue; model.DIV_ID = DIV_ID.SelectedValue; model.INV_TYPE = ConvertHelper.Cint(sINV_TYPE); model.STOCK_TYPE = ConvertHelper.Cint(sSTOCK_TYPE); model.BOM_TYPE = ConvertHelper.Cint(sBOM_TYPE); model.MarginControl = ConvertHelper.Cint(sMarginControl); model.PROD_RangTYPE = ConvertHelper.Cint(sPROD_RangTYPE); model.PROD_iRang = ConvertHelper.Cint(sPROD_iRang); model.PROD_SPEC = PROD_SPEC.Text; model.PROD_Margin = PROD_Margin.Text; model.PROD_BARCODE = PROD_BARCODE.Text; model.PROD_UNIT = sPROD_UNIT; model.PROD_UNIT1 = sPROD_UNIT1; model.PROD_CONVERT1 = ConvertHelper.Cint(sPROD_CONVERT1); model.PROD_UNIT2 = sPROD_UNIT2; model.PROD_CONVERT2 = ConvertHelper.Cint(sPROD_CONVERT2); model.Report_UNIT = ConvertHelper.Cint(sReport_UNIT); model.PROD_MEMO = PROD_MEMO.Text; if (id == 0) { model.CRT_DATETIME = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")); model.CRT_USER_ID = OlUser.Manager_LoginName; } else { model.CRT_DATETIME = model.CRT_DATETIME; model.CRT_USER_ID = model.CRT_USER_ID; } //model.CRT_USER_ID = ""; model.MOD_DATETIME = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")); model.MOD_USER_ID = OlUser.Manager_LoginName; //model.MOD_USER_ID = ""; model.LAST_UPDATE = ConvertHelper.StringToDatetime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")); model.STATUS = 0; #endregion ////---------------------------------------------------------- ////存储到数据库 //model.SetIsNew(false); PRODUCT00Bll.GetInstence().Save(this, model); PRODUCT00Bll.GetInstence().Insert_PRODUCT01(sPROD_ID, model.CRT_USER_ID); result = "保存成功"; LoadData2(sPROD_ID); LoadData(); } catch (Exception e) { result = "保存失败!"; //出现异常,保存出错日志信息 CommonBll.WriteLog(result, e); } return(result); }
/// <summary> /// 构造函数。 /// </summary> public SupplierCtrl() { InitializeComponent(); afterStateChanged += new AfterStateChanged(this.OnAfterStateChanged); GridViewHelper.SetGridView(gridViewCode); }
private void Page_Initialized(object sender, System.EventArgs e) { var helper = new GridViewHelper(RecentList); helper.OnMouseDoubleClick(RecentList_MouseDoubleClick); }
/// <summary> /// 根据区域特性初始化界面资源。 /// </summary> protected override void InitUIResourcesByCulture() { GridViewHelper.SetGridView(gridViewStep); GridViewHelper.SetGridView(gvOperation); GridViewHelper.SetGridView(gvRouteLine); lblMenu.Text = "基础数据>流程管理>工序流程"; base.InitUIResourcesByCulture(); this.toolbarNew.Text = StringParser.Parse("${res:Global.New}"); this.toolbarSave.Text = StringParser.Parse("${res:Global.Save}"); this.toolbarQuery.Text = StringParser.Parse("${res:Global.Query}"); this.toolbarDelete.Text = StringParser.Parse("${res:Global.Delete}"); this.toolbarStatus.Text = StringParser.Parse("${res:Global.Status}"); this.RouteBaseTabPage.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.RouteBaseTabPage}"); this.RouteEditTabPage.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.RouteEditTabPage}"); this.RouteLineTabPage.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.RouteLineTabPage}"); this.lblRouteName.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.lblRouteName}"); this.lblBeginTime.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.lblBeginTime}"); this.lblEndTime.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.lblEndTime}"); this.lblDescription.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.lblDescription}"); this.gridColumn_stepName.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_stepName}"); this.gridColumn_stepDescription.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_stepDescription}"); this.gridColumn_stepIsReWork.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_stepIsReWork}"); this.gridColumn_stepEditor.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_stepEditor}"); this.gridColumn_stepEditorTime.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_stepEditorTime}"); this.grpCtrlStep.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.grpCtrlStep}"); this.grpCrtlOperation.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.grpCrtlOperation}"); this.lblName.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.lblName}"); this.btnSearch.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.btnSearch}"); this.gridColumn_Name.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_Name}"); this.gridColumn_Description.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_Description}"); this.gridColumn_Version.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_Version}"); this.btnAdd.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.btnAdd}"); this.btnDel.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.btnDel}"); this.gridColumn_RouteName.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_RouteName}"); this.gridColumn_LineCode.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_LineCode}"); this.gridColumn_LineName.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_LineName}"); this.gridColumn_Descriptions.Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.RouteCtrl.gridColumn_Descriptions}"); }
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); } }
private void dgv_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { GridViewHelper.MergeColumns(this.dataGridView1, e, 0); }
private void RoleManageCtrl_Load(object sender, EventArgs e) { InitUIResourcesByCulture(); GridDataBind(); GridViewHelper.SetGridView(roleView); }
const int COL_NUM = 10; //默认的列数 public WarehouseWarrantSynCtrl(IViewContent view) { InitializeComponent(); this._view = view; GridViewHelper.SetGridView(gridView1); }
private void BtnUp_Click(object sender, EventArgs e) { GridViewHelper.MoveRow(gridView1, DevMoveState.previous); this.SetOrder(); }
private void ExportExcel(object sender, EventArgs e) { #region 导出Excel GridViewHelper.ExportToXlsx(gridControl1); #endregion }
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; }
protected void Page_Load(object sender, EventArgs e) { 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(); try { sqlDa.Fill(dsClinicList, "ClinicList"); ddlOrganization.DataSource = dsClinicList; ddlOrganization.DataTextField = "Clinic_Name"; ddlOrganization.DataValueField = "Clinic_ID"; ddlOrganization.DataBind(); if (dsClinicList.Tables[0].Rows.Count < 2) { ddlOrganization.Items.RemoveAt(0); } else { ddlLocation.Items.Insert(0, new ListItem("All Locations", "0")); ddlLocation.SelectedIndex = 0; } ddlOrganization.SelectedIndex = 0; bindLocation(ddlOrganization.SelectedValue); } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } //if ((string)Session["Role"] == "P" || (string)Session["Role"] == "T") //{ // ddlRxType.SelectedValue = "R"; //} //ddlStatus.SelectedValue = "N"; //helper.ApplyGroupSort(); txtDate.Text = DateTime.Now.ToString("MM/dd/yyyy"); } GridViewHelper helper = new GridViewHelper(this.gridRxReqList); string[] group = { "doctorName", "PatientName" }; //helper.RegisterGroup(group, true, true); helper.RegisterGroup("Clinic_Name", true, true); helper.RegisterGroup("Facility_Name", true, true); helper.RegisterGroup(group, true, true); //helper.RegisterGroup("DoctorName", true, true); //helper.RegisterGroup("PatientName", true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); Filldata(int.Parse(ddlOrganization.SelectedValue), 0, txtDate.Text); lblHeading.Text = "Rx Request Printing - " + txtDate.Text; }
protected override void InitUIResourcesByCulture() { GridViewHelper.SetGridView(grdViewOperations); GridViewHelper.SetGridView(grdViewEquipments); this.tsbEdit.Text = StringParser.Parse("${res:Global.Edit}"); this.tsbSave.Text = StringParser.Parse("${res:Global.Save}"); this.tsbCancel.Text = StringParser.Parse("${res:Global.Cancel}"); //注释 by peter zhang 工具栏图标从当前项目中获取 //this.tsbEdit.Image = (Image)ResourceService.GetImageResource("Icons.16x16.Edit"); //this.tsbSave.Image = (Image)ResourceService.GetImageResource("Icons.16x16.SaveIcon"); //this.tsbCancel.Image = (Image)ResourceService.GetImageResource("Icons.16x16.Cancel"); //this.lblTitle.Text=StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.Name}"); //this.grpOperationQuery.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationQuery}"); this.lblQueryName.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationName}"); this.btnQuery.Text = StringParser.Parse("${res:Global.Query}"); this.grpOperationInfo.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationInfo}"); this.grpEquipmentInfo.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.EquipmentInfo}"); this.btnAddEquipment.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.AddEquipment}"); this.btnDelEquipment.Text = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.DelEquipment}"); this.grdViewOperations.Columns["RN"].Caption = StringParser.Parse("${res:Global.RowNumber}"); this.grdViewOperations.Columns["RN"].Width = 35; this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_ROUTE_OPERATION_VER_KEY].Visible = false; this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_ROUTE_OPERATION_NAME].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationName}"); this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_DESCRIPTIONS].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationDescription}"); this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_IMAGE_KEY].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationImage}"); this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_DURATION].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationDuration}"); this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_OPERATION_VERSION].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationVersion}"); this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_OPERATION_STATUS].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.OperationStatus}"); this.grdViewOperations.Columns[POR_ROUTE_OPERATION_VER_FIELDS.FIELD_IS_REWORKABLE].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.OperationEquipments.IsReworkable}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_NAME].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.EquipmentName}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_DESCRIPTION].Caption = StringParser.Parse("${res:Global.Description}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_TYPE].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.EquipmentType}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_CODE].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.EquipmentCode}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_MODE].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.EquipmentMode}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_MINQUANTITY].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.MinQuantity}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_MAXQUANTITY].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.MaxQuantity}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_STATE_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_CHANGE_STATE_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_GROUP_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_LOCATION_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_PARENT_EQUIPMENT_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_ISCHAMBER].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0002}");//是否腔体 this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_ISMULTICHAMBER].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.IsMultiChamber}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_ISBATCH].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.IsBatch}"); this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_CHAMBER_INDEX].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0006}"); //"腔体编号"; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_CHAMBER_TOTAL].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0005}"); //"腔体数量"; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_WPH].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0011}"); //"设备WPH"; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_TRACT_TIME].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0008}"); //"设备TractTime"; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_AV_TIME].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0007}"); //"设备AvTime"; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EQUIPMENT_ASSETSNO].Caption = StringParser.Parse("${res:FanHai.Hemera.Addins.EMS.Equipments.lbl.0010}"); //"资产编号"; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_CREATOR].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_CREATE_TIMEZONE_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_CREATE_TIME].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EDITOR].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EDIT_TIMEZONE_KEY].Visible = false; this.grdViewEquipments.Columns[EMS_EQUIPMENTS_FIELDS.FIELD_EDIT_TIME].Visible = false; }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["User"] == null || Session["Role"] == null) Response.Redirect("../Login.aspx"); GridViewHelper helper = new GridViewHelper(this.gridPatientList); helper.RegisterGroup("Clinic_Name", true, true); helper.RegisterGroup("Facility_Name", true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); if (!Page.IsPostBack) { 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"); ddlOrganization.DataSource = dsClinicList; ddlOrganization.DataTextField = "Clinic_Name"; ddlOrganization.DataValueField = "Clinic_ID"; ddlOrganization.DataBind(); if (dsClinicList.Tables[0].Rows.Count < 2) { ddlOrganization.Items.RemoveAt(0); } else { ddlLocation.Items.Insert(0, new ListItem("All Locations", "0")); ddlLocation.SelectedIndex = 0; } ddlOrganization.SelectedIndex = 0; bindLocation(ddlOrganization.SelectedValue); Filldata(int.Parse(ddlOrganization.SelectedValue), 0, 0); } lblHeading.Text = "Patient List"; } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { GridViewHelper helper = new GridViewHelper(this.gvMain); helper.RegisterSummary("ORDERQTY", SummaryOperation.Sum); helper.RegisterSummary("ITEMTOTALPRICE", SummaryOperation.Sum); helper.GeneralSummary += new FooterEvent(helper_GeneralSummary); // print order btnPrint.OnClientClick = @"window.open('../report/printorder.aspx?oid=" + OrderId + "','printOrder_at_" + DateTime.Now.ToString("dd_MM_yyyy_hh_mm_ss") + "',''); return false;"; if (!Page.IsPostBack) { LoadRequeryParams(); btnPrint.Text = Resources.OrderForm.PrintOrder; if (OrderId != 0) { BindData(); LoadBonus(); cmdDoSplit.OnClientClick = CreateConfirmScript(Resources.Question.OrderSplit); cmdRefreshShipping.Enabled = (CurrentOrderHeader != null) && (!string.IsNullOrEmpty(CurrentOrderHeader.Ordernumber)); } else Response.Redirect("Business.aspx"); } }
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(); }
/// <summary> /// 构造函数 /// </summary> public MaterialRequisitionCtrl() { InitializeComponent(); InitializeLanguage(); GridViewHelper.SetGridView(gvInf); }
public void BindGrid() { grdWarranty.Columns.Clear(); DataTable dtWarranty = getTable(); string strFromDate = drpFromMonth.SelectedValue + "/01/" + drpFromYear.SelectedItem.Text; string strToDate = drpToMonth.SelectedValue + "/02/" + drpToYear.SelectedItem.Text; string strSalesPeriodQuery = "Select distinct Sales_Month,Sales_Year,substring(DateName(month,Convert(varchar,Sales_Month)+'/01/'+Convert(varchar,Sales_Year)),1,3)+'-'+Convert(varchar,Sales_Year) as Sales_Period from TempWarrantyMain where SalesDate between '"+ strFromDate +"' and '"+ strToDate +"' order by Sales_Year,Sales_Month"; DataTable dt = objQueryController.ExecuteQuery(strSalesPeriodQuery); BoundField bndField = new BoundField(); bndField.DataField = "Field"; bndField.HeaderText = "Model"; grdWarranty.Columns.Add(bndField); if (dt != null) { if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { BoundField bnField = new BoundField(); bnField.DataField = dr["Sales_Period"].ToString(); bnField.HeaderText = dr["Sales_Period"].ToString(); grdWarranty.Columns.Add(bnField); } } } if (dtWarranty != null) { if (dtWarranty.Rows.Count > 0) { grdWarranty.DataSource = dtWarranty; grdWarranty.DataBind(); strGroup = "Model"; helper = new GridViewHelper(this.grdWarranty, false); string[] cols = new string[1]; cols[0] = strGroup; helper.RegisterGroup(cols, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); btnExport.Visible = true; grdWarranty.DataBind(); //foreach (GridViewRow gr in grdWarranty.Rows) //{ // string strWarrantyPeriod = gr.Cells[7].Text; // if (strWarrantyPeriod == "1") // { // gr.Cells[3].Text = "NA"; // gr.Cells[5].Text = "NA"; // gr.Cells[6].Text = "NA"; // } //} //grdWarranty.Columns[7].Visible = false; } else { btnExport.Visible = false; grdWarranty.DataSource = null; grdWarranty.DataBind(); } } else { btnExport.Visible = false; grdWarranty.DataSource = null; grdWarranty.DataBind(); } }
private IList <Framework.DataServices.Model.EntityBaseData> LoadData(bool groupHeaderItems, int rodada, DateTime dataInicial, DateTime dataFinal, string time, string fase, string grupo) { Mode modeItem = Mode.All; IList <Framework.DataServices.Model.EntityBaseData> list = null; if (ViewState["mode"] != null) { modeItem = (Mode)ViewState["mode"]; } //Se deve agrupar os jogos if (groupHeaderItems && modeItem != Mode.Apostas) { GridViewHelper helper = new GridViewHelper(this.grdJogos); helper.GroupHeader += new GroupEvent(helper_GroupHeader); helper.RegisterGroup("rodada", true, true); helper.RegisterGroup("onlydatajogo", true, true); ViewState["refreshed"] = true; }//endif agrupar items switch (modeItem) { case Mode.All: case Mode.JogosBolao: //Criando o objeto a ser carregada as informações Business.Campeonatos.Support.Jogo jogo = new BolaoNet.Business.Campeonatos.Support.Jogo(UserBasePage.CurrentUserName); //Buscando os jogos por período list = jogo.SelectAllByPeriod( CampeonatoUserBasePage.CurrentCampeonato, rodada, dataInicial, dataFinal, time, fase, grupo, null, null); break; case Mode.Apostas: //Criando o objeto a ser carregada as informações Business.Boloes.Support.JogoUsuario jogoUsuario = new BolaoNet.Business.Boloes.Support.JogoUsuario(UserBasePage.CurrentUserName); //Buscando os jogos por período list = jogoUsuario.SelectAllByPeriod( BolaoUserBasePage.CurrentBolao, this.UserNameToCheck, rodada, dataInicial, dataFinal, time, fase, grupo, null); break; case Mode.JogoByTime: break; case Mode.ApostasReadOnly: //Criando o objeto a ser carregada as informações Business.Boloes.Support.JogoUsuario jogoUsuarioReadOnly = new BolaoNet.Business.Boloes.Support.JogoUsuario(UserBasePage.CurrentUserName); //Buscando os jogos por período list = jogoUsuarioReadOnly.SelectAllByPeriod( BolaoUserBasePage.CurrentBolao, this.UserNameToCheck, rodada, dataInicial, dataFinal, time, fase, grupo, null); break; }//end switch return(list); }
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; }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["User"] == null || Session["Role"] == null) Response.Redirect("../Login.aspx"); GridViewHelper helper = new GridViewHelper(this.gridRxQueue); helper.RegisterGroup("Clinic_Name", true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); Filldata(); if (!Page.IsPostBack) { lblHeading.Text = "Rx Queue - " + DateTime.Now.ToString("MM/dd/yyyy"); } } catch (Exception ex) { objNLog.Error("Error : " + ex.Message); } }
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 static HelperResult GridScript(this HtmlHelper helper) { return(GridViewHelper.GridScript()); }
private void InitGrid() { #region 初始化列 this.gridView1.OptionsView.AllowCellMerge = true; GridColumn col = GridViewHelper.AddColumn(this.gridView1, "MoCode", "生产订单号", 100); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "SortSeq", "行号", 50); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "CardNo", "流转卡号", 100); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col.Summary.Add(DevExpress.Data.SummaryItemType.Count); col.Summary[0].FieldName = "CardNo"; col.Summary[0].DisplayFormat = "记录: {0}"; col.Fixed = FixedStyle.Left; col = GridViewHelper.AddColumn(this.gridView1, "cInvCode", "存货编码", 150); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvName", "存货名称", 150); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cInvStd", "规格型号", 120); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "yachang", "牙长", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "dubie", "镀别", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "Free1", "头标", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "cDepName", "当前部门", 80); col.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.True; col = GridViewHelper.AddColumn(this.gridView1, "OpSeq", "工序序号", 70); col = GridViewHelper.AddColumn(this.gridView1, "OPName", "工序名称", 70); col = GridViewHelper.AddColumn(this.gridView1, "iWeight", "重量", 90); col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "#,##0.00"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].FieldName = "iWeight"; col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(this.gridView1, "iQuantity", "千件", 80); col.AppearanceCell.ForeColor = Color.Red; col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "#,##0.00"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].FieldName = "iQuantity"; col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(this.gridView1, "orderQty", "生产订单千件", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "#,##0.00"; GridViewHelper.AddColumn(this.gridView1, "RepDate", "报工日期", 80); GridViewHelper.AddColumn(this.gridView1, "RepPsn", "报工人", 60); GridViewHelper.AddColumn(this.gridView1, "HeatNo", "热处理批号", 80); GridViewHelper.AddColumn(this.gridView1, "ylBarCode", "原料条码", 80); GridViewHelper.AddColumn(this.gridView1, "luhao", "炉号", 80); GridViewHelper.AddColumn(this.gridView1, "chandi", "产地", 70); GridViewHelper.AddColumn(this.gridView1, "caizhi", "材质", 70); GridViewHelper.AddColumn(this.gridView1, "hhph", "回火批号", 80); //GridViewHelper.AddColumn(this.gridView1, "Remark", "备注", 150); #endregion }
private void InitDGX() { DGX.OptionsBehavior.AutoPopulateColumns = false; GridViewHelper.AddColumn(DGX, "QMCode", "报检单号", 100); GridViewHelper.AddColumn(DGX, "bQualify", "是否检验", 60); GridViewHelper.AddColumn(DGX, "dDate", "日期", 80); GridViewHelper.AddColumn(DGX, "dAuditDate", "审核日期", 80); GridViewHelper.AddColumn(DGX, "cVenName", "供应商名称", 120); GridViewHelper.AddColumn(DGX, "cPOID", "采购订单号", 90); GridViewHelper.AddColumn(DGX, "ivouchrowno", "行号", 40); GridViewHelper.AddColumn(DGX, "cPosCode", "货位编码", 70); GridViewHelper.AddColumn(DGX, "cPosName", "货位名称", 90); GridViewHelper.AddColumn(DGX, "cInvCode", "存货编码", 90); GridViewHelper.AddColumn(DGX, "cInvName", "存货名称", 90); GridViewHelper.AddColumn(DGX, "cInvStd", "规格型号", 90); GridViewHelper.AddColumn(DGX, "cComUnitName", "单位", 40); var col = GridViewHelper.AddColumn(DGX, "iQuantity", "订单数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(DGX, "arrQty", "到货数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(DGX, "qmQty", "报检数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(DGX, "canQmQty", "待检验数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.AppearanceCell.ForeColor = Color.Blue; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(DGX, "haveQmQty", "已检数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(DGX, "canStockInQty", "待入库数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.AppearanceCell.ForeColor = Color.Red; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; col = GridViewHelper.AddColumn(DGX, "stockInQty", "已入库数量", 90); col.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; col.DisplayFormat.FormatString = "{0:n2}"; col.Summary.Add(DevExpress.Data.SummaryItemType.Sum); col.Summary[0].DisplayFormat = "{0:n2}"; GridViewHelper.AddColumn(DGX, "cAuditPsn", "审核人", 70); GridViewHelper.AddColumn(DGX, "cMaker", "制单人", 70); GridViewHelper.AddColumn(DGX, "cMemo", "备注", 100); }
/// <summary> /// 构造函数 /// </summary> public MaterialRequisitionAndReturnListCtrl() { InitializeComponent(); InitializeLanguage(); GridViewHelper.SetGridView(gdvMaterialList); }
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; }
protected void Page_Load(object sender, EventArgs e) { LinkButton eas_pesquisarcnes = this.WUC_PesquisarEstabelecimento1.WUC_LinkButton_PesquisarCNES; LinkButton eas_pesquisarnome = this.WUC_PesquisarEstabelecimento1.WUC_LinkButton_PesquisarNomeFantasia; eas_pesquisarcnes.Click += new EventHandler(OnClick_PesquisarCNES); eas_pesquisarnome.Click += new EventHandler(OnClick_PesquisarNomeFantasiaUnidade); this.InserirTrigger(eas_pesquisarcnes.UniqueID, "Click", this.UpdatePanel_Unidade); this.InserirTrigger(eas_pesquisarnome.UniqueID, "Click", this.UpdatePanel_Unidade); if (!IsPostBack) { GridViewHelper helper = new GridViewHelper(this.GridViewParametros); helper.RegisterGroup("CNES", true, true); helper.RegisterSummary("Percentual", SummaryOperation.Sum, "CNES"); this.WUC_PesquisarEstabelecimento1.WUC_EstabelecimentosPesquisados = new List<ViverMais.Model.EstabelecimentoSaude>(); //this.ddlUnidade.Attributes.Add("onmouseover", "javascript:showTooltip(this);"); if (Factory.GetInstance<ISeguranca>().VerificarPermissao(((Usuario)Session["Usuario"]).Codigo, "PARAMETRIZACAO_AGENDA_AMBULATORIAL", Modulo.AGENDAMENTO)) { PanelPesquisaProcedimento.Visible = false; PanelListaParametros.Visible = false; PanelProcedimento.Visible = false; } else ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('Usuário, você não tem permissão para acessar esta página! Por favor, entre em contato com a administração.');location='Default.aspx';", true); } }