public static string GetSeqListSelected(GridView grvList, string CheckBoxId, int ColSelect, int ColSeq) { string SeqList = ""; for (int i = 0, i2 = grvList.Rows.Count; i < i2; i++) { CheckBox chkSelect = grvList.Rows[i].Cells[ColSelect].FindControl(CheckBoxId) as CheckBox; if (chkSelect == null) { continue; } if (!chkSelect.Checked) { continue; } int Seq = CFindRep.IfNotNumberThen0(grvList.Rows[i].Cells[ColSeq].Text); if (Seq == 0) { continue; } SeqList += "," + Seq.ToString(); } if (SeqList != "") { SeqList = SeqList.Substring(1); } return(SeqList); }
public static int GetAttributeInt32(XmlAttribute Attr) { if (Attr != null) { return(CFindRep.IfNotNumberThen0(Attr.Value)); } else { return(0); } }
public static int GetLinkButtonValue(TableCell cell) { LinkButton lbt = cell.Controls[0] as LinkButton; if (lbt == null) { return(0); } return(CFindRep.IfNotNumberThen0(lbt.Text)); }
public static void SplitToVariable(string ValueList, char Delim, out string Value1Is, out int Value2Is, out int Value3Is) { Value1Is = ""; Value2Is = 0; Value3Is = 0; string sValue2Is; string sValue3Is; string sValue4Is; SplitToVariable(ValueList, Delim, out Value1Is, out sValue2Is, out sValue3Is, out sValue4Is); Value2Is = CFindRep.IfNotNumberThen0(sValue2Is); Value3Is = CFindRep.IfNotNumberThen0(sValue3Is); }
public static void RestoreListControlSelectedIndex(string AppProductName, ContainerControl FrmOrUc, ListControl lst, CXmlConfig xc) { string FrmOrUcName = FrmOrUc.Name; string Section = AppProductName + "\\" + FrmOrUcName; string ControlName = lst.Name; int SelectedIndex = (xc != null) ? CFindRep.IfNotNumberThen0(xc.GetSetting(FrmOrUcName + "." + ControlName, lst.SelectedIndex)) : CFindRep.IfNotNumberThen0(CRegistry.GetSetting(Section, ControlName, lst.SelectedIndex)); if (lst.SelectedIndex != SelectedIndex) { //Items.Count 읽을 수 없어 try 사용. try { lst.SelectedIndex = SelectedIndex; } catch (Exception) { } } }
private static Version GetVersion(XmlDocument XDoc) { XmlAttribute Attr = XDoc.DocumentElement.Attributes["FileVersion"]; if (Attr == null) { return(new Version()); } int Version = CFindRep.IfNotNumberThen0(Attr.Value); if (Version > 0) { //4255 -> 4.2.5.5 string[] aVersion = CArray.SplitByLength(Attr.Value, 1); return(new Version(Convert.ToInt32(aVersion[0]), Convert.ToInt32(aVersion[1]), Convert.ToInt32(aVersion[2]), Convert.ToInt32(aVersion[3]))); } else { return(new Version(Attr.Value)); } }
public static int ColumnInt32(ComboBox cbo, object Column) { return(CFindRep.IfNotNumberThen0(CRowSource.Column(cbo, Column))); }