protected void Page_Load(object sender, System.EventArgs e) { string output = string.Empty; rowinfo = array(); bodyDict = array(); rowinfo["data"] = list(); id = (string)this.Request["id"]; smarty.Add("id", id); if ((string)this.Request["mode"] == "lookup") { mode = MODE.MODE_LIST_LOOKUP; } ProcessRequest(); Body(); ProcessSessionVariables(); DeleteRecord(); ProcessPermissions(); AddMasterDetailInfo(); GetData(); InlineAdd(); BuildForm(); AddSearchAttributes(); AddLoginAttributes(); AddLinkAttributes(); AddDisplayGridAttributes(); AddLinkdata(); output = func.BuildOutput(this, @"~\POKJA_list.aspx", smarty); this.Response.Write(output); this.Response.End(); }
protected void Page_Load(object sender, System.EventArgs e) { string output = string.Empty; if (User != null && !string.IsNullOrEmpty("DOKUMEN")) { OwnerColumn = func.GetOwnerIDField("DOKUMEN"); } allow_KELENGKAPAN = func.CheckUserPermissions("dbo.KELENGKAPAN", "SA"); rowinfo = array(); bodyDict = array(); rowinfo["data"] = list(); id = (string)this.Request["id"]; smarty.Add("id", id); if ((string)this.Request["mode"] == "lookup") { mode = MODE.MODE_LIST_LOOKUP; } if (!CheckSecurity()) { this.Response.End(); return; } ProcessRequest(); Body(); ProcessSessionVariables(); DeleteRecord(); ProcessPermissions(); AddMasterDetailInfo(); GetData(); InlineAdd(); BuildForm(); AddSearchAttributes(); AddLoginAttributes(); AddLinkAttributes(); AddDisplayGridAttributes(); AddLinkdata(); output = func.BuildOutput(this, @"~\DOKUMEN_list.aspx", smarty); this.Response.Write(output); this.Response.End(); }
public static string GetTotals(string field, IList <string> argvalue, string stype, string sFormat, int nCulture, Dictionary <string, object> smarty, Builder builder, HttpRequest request, Smarty.MODE mode) { double value = 0.0; if (argvalue.Count == 0) { return(string.Empty); } if (stype != "COUNT") { foreach (string listValue in argvalue) { double testVal; if (double.TryParse(listValue, out testVal)) { value += testVal; } } } if (stype == "AVERAGE") { if (argvalue.Count > 0) { value = Math.Round(value / argvalue.Count, 2); } else { return(string.Empty); } } string sValue = string.Empty; FORMAT format = Control.StringToFormat(sFormat); if (format == FORMAT.FORMAT_CURRENCY) { CultureInfo ci = new CultureInfo(nCulture); sValue = value.ToString("C3", ci); } else if (format == FORMAT.FORMAT_PERCENT) { CultureInfo ci = new CultureInfo(nCulture); sValue = value.ToString("P", ci); } else if (format == FORMAT.FORMAT_NUMBER) { CultureInfo ci = new CultureInfo(nCulture); sValue = value.ToString("N", ci); } else if (format == FORMAT.FORMAT_CUSTOM && stype != "COUNT") { Control control = new Control(field, value, false, smarty, request, builder, mode); sValue = control.GetData(); } else { sValue = value.ToString(); } if (stype == "COUNT") { return(argvalue.Count.ToString()); } if (stype == "TOTAL") { return(sValue); } if (stype == "AVERAGE") { return(sValue); } return(string.Empty); }