Example #1
0
 public ComboItem(int?key, string value)
 {
     if (key.HasValue)
     {
         Key = key; Value = value;
     }
     else
     {
         GF.Error("Key of ComboItem[" + value + "] is invalid");
     }
 }
        bool validate(out Dictionary <string, string> postParam)
        {
            postParam = null;

            if (string.IsNullOrEmpty(pagination.page.Text.Trim()))
            {
                GF.Error("ยังไม่ได้ระบุ 'หน้าที่' !");
                pagination.page.Select();
                return(false);
            }

            postParam = new()
            {
                { "page", pagination.page.Text.Trim() }
            };
            return(true);
        }
        bool validate(out Dictionary <string, string> postParam)
        {
            postParam = null;
            string branch = string.Empty;

            for (int i = 0; i < branch_list.Items.Count; i++)
            {
                if (branch_list.GetItemCheckState(i) == CheckState.Checked)
                {
                    branch += (branch_list.Items[i] as ComboItem).Key.ToString() + ",";
                }
            }

            if (string.IsNullOrEmpty(branch))
            {
                GF.Error("ยังไม่ได้เลือกสาขา !");
                return(false);
            }
            else
            {
                branch = branch[0..^ 1];