Exemple #1
0
 private void search()
 {
     enabledSearch();
     Business.BsItemField iten = new Business.BsItemField(new Business.BsField(idField));
     dgGroups.DataSource = iten.GetObjects();
     dgGroups.DataBind();
 }
Exemple #2
0
 private void delItensField(int id)
 {
     Business.BsItemField f = new Business.BsItemField();
     f.Id = id;
     f.ExcludeObject();
     search();
 }
Exemple #3
0
 private void getData(int id)
 {
     fields();
     Business.BsItemField iten = new Business.BsItemField();
     iten.Id = id;
     iten.GetObject();;
     if (iten.Id > 0)
     {
         txtIDescription.Text = iten.Value;
         txtId.Text           = iten.Id + "";
     }
 }
Exemple #4
0
        private void btnInclu_Click(object sender, System.EventArgs e)
        {
            Business.BsItemField iten = new Business.BsItemField();
            iten.Id       = Convert.ToInt32("0" + txtId.Text);
            iten.Value    = txtIDescription.Text;
            iten.Field.Id = idField;
            iten.SaveObject();

            if (txtId.Text == "")
            {
                RegisterClientScriptBlock("ok", "<script>alert( 'Item cadastrado.' )</script>");
                clearFields();
            }
            else
            {
                search();
            }
        }
Exemple #5
0
        private BsItemField setObject(BsItemField f_, DataRow dr_)
        {
            f_._id   = Convert.ToInt32(dr_["idItemField"]);
            f_.Value = dr_["valueField"].ToString();

            f_.Field.Id            = Convert.ToInt32(dr_["idField"]);
            f_.Field.Name          = dr_["name"].ToString();
            f_.Field.Size          = Convert.ToInt32(dr_["sizeField"]);
            f_.Field.Compulsory    = Convert.ToBoolean(dr_["compulsory"]);
            f_.Field.Preview       = Convert.ToBoolean(dr_["preview"]);
            f_.Field.Detail        = Convert.ToBoolean(dr_["detail"]);
            f_.Field.Orders        = Convert.ToInt32(dr_["orders"]);
            f_.Field.Form.Id       = Convert.ToInt32(dr_["idForm"]);
            f_.Field.Type.Id       = Convert.ToInt32(dr_["idType"]);
            f_.Field.TypeObject.Id = Convert.ToInt32(dr_["idObject"]);
            f_.Field.Mask.Id       = Convert.ToInt32(dr_["idMask"]);

            return(f_);
        }