Exemplo n.º 1
0
 private void DataCheck(DataRow row, FineUIPro.Form form, ref string msg)
 {
     foreach (FineUIPro.FormRow fr in form.Rows)
     {
         if (fr.Hidden)
         {
             continue;
         }
         foreach (Field cl in fr.Items)
         {
             if (cl is FineUIPro.TextBox)
             {
                 FineUIPro.TextBox tbx = (FineUIPro.TextBox)cl;
                 if (tbx.Text != row[tbx.ID.Substring(3)].ToString())
                 {
                     msg += string.Format("字段【{0}】由【{1}】变更为【{2}】;", tbx.Text + "_" + tbx.ID.Substring(3), row[tbx.ID.Substring(3)].ToString(), tbx.Text);
                 }
             }
             else if (cl is FineUIPro.DropDownList)
             {
                 FineUIPro.DropDownList ddl = (FineUIPro.DropDownList)cl;
                 if (ddl.SelectedValue != row[ddl.ID.Substring(3)].ToString())
                 {
                     msg += string.Format("字段【{0}】由【{1}】变更为【{2}】;", ddl.Text + "_" + ddl.ID.Substring(3), row[ddl.ID.Substring(3)].ToString(), ddl.SelectedValue);
                 }
             }
             else if (cl is FineUIPro.NumberBox)
             {
                 FineUIPro.NumberBox nbb = (FineUIPro.NumberBox)cl;
                 if (nbb.Text != row[nbb.ID.Substring(3)].ToString())
                 {
                     msg += string.Format("字段【{0}】由【{1}】变更为【{2}】;", nbb.Text + "_" + nbb.ID.Substring(3), row[nbb.ID.Substring(3)].ToString(), nbb.Text);
                 }
             }
             else if (cl is FineUIPro.DatePicker)
             {
                 FineUIPro.DatePicker dpk = (FineUIPro.DatePicker)cl;
                 if (dpk.Text != row[dpk.ID.Substring(3)].ToString())
                 {
                     msg += string.Format("字段【{0}】由【{1}】变更为【{2}】;", dpk.Text + "_" + dpk.ID.Substring(3), row[dpk.ID.Substring(3)].ToString(), dpk.Text);
                 }
             }
             else if (cl is FineUIPro.CheckBox)
             {
                 FineUIPro.CheckBox ckb = (FineUIPro.CheckBox)cl;
                 //row[ckb.ID.Substring(3)].ToString()
                 string strValue = ckb.Checked ? "Y" : "N";
                 if (row[ckb.ID.Substring(3)].ToString() != strValue)
                 {
                     msg += string.Format("字段【{0}】由【{1}】变更为【{2}】;", ckb.Text + "_" + ckb.ID.Substring(3), row[ckb.ID.Substring(3)].ToString(), strValue);
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
        private void GetDdlList(FineUIPro.DropDownList ddlGZ)
        {
            List <CustomClass> myList = new List <CustomClass>();

            myList.Add(new CustomClass("", "--全部--"));
            myList.Add(new CustomClass("N", "无高值"));
            myList.Add(new CustomClass("Y", "有高值"));
            ddlGZ.DataTextField  = "Name";
            ddlGZ.DataValueField = "ID";
            ddlGZ.DataSource     = myList;
            ddlGZ.DataBind();
        }
 private void ResolveSubTree(DataRow dataRow, FineUIPro.DropDownList drp)
 {
     DataRow[] rows = dataRow.GetChildRows("TreeRelation");
     if (rows.Length > 0)
     {
         foreach (DataRow row in rows)
         {
             FineUIPro.ListItem it = new FineUIPro.ListItem();
             it.Text              = row["Name"].ToString();
             it.Value             = row["Id"].ToString();
             it.SimulateTreeLevel = 2;
             drp.Items.Add(it);
             ResolveSubTree(row, ddlfatherId);
         }
     }
 }
Exemplo n.º 4
0
        public static void CleanItemForDDL(string CleanName, FineUIPro.DropDownList dropDownList)
        {
            //用于取消下拉表中不需要的选项
            int GetItem = 0;

            foreach (FineUIPro.ListItem item in dropDownList.Items)
            {
                if (item.Text == CleanName)
                {
                    dropDownList.Items.RemoveAt(GetItem);
                    break;
                }
                else
                {
                    if (item.Value == CleanName)
                    {
                        dropDownList.Items.RemoveAt(GetItem);
                        break;
                    }
                }
                GetItem++;
            }
        }
Exemplo n.º 5
0
 private void formGet(Form formItms, DataRow row)
 {
     foreach (Control control in formItms.Controls)
     {
         foreach (Control item in control.Controls)
         {
             if (item is FineUIPro.TextBox)
             {
                 FineUIPro.TextBox txt = (FineUIPro.TextBox)item;
                 try
                 {
                     txt.Text = row[txt.ID.Substring(3)].ToString();
                 }
                 catch { }
             }
             else if (item is FineUIPro.DropDownList)
             {
                 FineUIPro.DropDownList ddl = (FineUIPro.DropDownList)item;
                 if (ddl.ID.Substring(3) == "TYPE")
                 {
                     ddl.SelectedValue = ddlType.SelectedValue;
                 }
                 else
                 {
                     try
                     {
                         ddl.SelectedValue = row[ddl.ID.Substring(3)].ToString();
                     }
                     catch { }
                 }
             }
             else if (item is FineUIPro.CheckBox)
             {
                 FineUIPro.CheckBox cbx = (FineUIPro.CheckBox)item; try
                 {
                     if (row[cbx.ID.Substring(3)].ToString() == "Y")
                     {
                         cbx.Checked = true;
                     }
                     else
                     {
                         cbx.Checked = false;
                     }
                 }
                 catch { }
             }
             else if (item is FineUIPro.NumberBox)
             {
                 FineUIPro.NumberBox num = (FineUIPro.NumberBox)item;
                 try
                 {
                     num.Text = row[num.ID.Substring(3)].ToString();
                 }
                 catch { }
             }
             else if (item is FineUIPro.DatePicker)
             {
                 FineUIPro.DatePicker date = (FineUIPro.DatePicker)item;
                 try
                 {
                     date.Text = row[date.ID.Substring(3)].ToString();
                 }
                 catch { }
             }
         }
     }
 }