private void SetCultureId(RoboCoder.WebControls.ComboBox ddl, string keyId) { System.Collections.Generic.Dictionary <string, string> context = new System.Collections.Generic.Dictionary <string, string>(); context["method"] = "GetDdlCultureId"; context["addnew"] = "Y"; context["mKey"] = "CultureTypeId"; context["mVal"] = "CultureTypeLabel"; context["mTip"] = "CultureTypeLabel"; context["mImg"] = "CultureTypeLabel"; context["ssd"] = Request.QueryString["ssd"]; context["scr"] = "1"; context["csy"] = "3"; context["filter"] = "0"; context["isSys"] = "N"; context["conn"] = string.Empty; ddl.AutoCompleteUrl = "AutoComplete.aspx/DdlSuggests"; ddl.DataContext = context; if (ddl != null) { DataView dv = null; if (keyId == string.Empty && ddl.SearchText.StartsWith("**")) { keyId = ddl.SearchText.Substring(2); } try { dv = new DataView((new AdminSystem()).GetDdl(1, "GetDdlCultureId", true, false, 0, keyId, null, null, string.Empty, base.LImpr, base.LCurr)); } catch { return; } ddl.DataSource = dv; try { ddl.SelectByValue(keyId, string.Empty, false); } catch { try { ddl.SelectedIndex = 0; } catch { } } } }
private void PreMsgPopup(string msg, RoboCoder.WebControls.ComboBox cb = null, WebControl wc = null) { if (string.IsNullOrEmpty(msg)) { return; } int MsgPos = msg.IndexOf("RO.SystemFramewk.ApplicationAssert"); string iconUrl = "images/warning.gif"; string focusOnCloseId = cb != null ? cb.FocusID : (wc != null ? wc.ClientID : string.Empty); string msgContent = ReformatErrMsg(msg); if (MsgPos >= 0 && LUser.TechnicalUsr != "Y") { msgContent = ReformatErrMsg(msg.Substring(0, MsgPos - 3)); } if (bErrNow.Value == "Y") { iconUrl = "images/error.gif"; bErrNow.Value = "N"; } else if (bInfoNow.Value == "Y") { iconUrl = "images/info.gif"; bInfoNow.Value = "N"; } string script = @"<script type='text/javascript' lang='javascript'> PopDialog('" + iconUrl + "','" + msgContent.Replace(@"\", @"\\").Replace("'", @"\'") + "','" + focusOnCloseId + @"'); </script>" ; ScriptManager.RegisterStartupScript(cMsgContent, typeof(Label), "Popup", script, false); }