Ejemplo n.º 1
0
        public bool Exists1(T_Units obj)
        {
            String stmtId = "T_Units.Exists1";
            bool   result = MyISqlMap.QueryForObject <bool>(stmtId, obj);

            return(result);
        }
Ejemplo n.º 2
0
        public T_Units Find(String unitID)
        {
            String  stmtId = "T_Units.Find";
            T_Units result = MyISqlMap.QueryForObject <T_Units>(stmtId, unitID);

            return(result);
        }
Ejemplo n.º 3
0
        public void Updates(T_Units obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }
            String stmtId = "T_Units.Updates";

            MyISqlMap.Update(stmtId, obj);
        }
Ejemplo n.º 4
0
        public void Insert(T_Units obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }
            String stmtId = "T_Units.Insert";

            MyISqlMap.Insert(stmtId, obj);
        }
Ejemplo n.º 5
0
        public void Delete(String unitID)
        {
            if (unitID == null)
            {
                throw new ArgumentNullException("obj");
            }
            String  stmtId = "T_Units.Delete";
            T_Units obj    = new T_Units();

            obj.UnitID = unitID;
            MyISqlMap.Delete(stmtId, obj);
        }
Ejemplo n.º 6
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (string.Compare(cboUnittype.SelectedValue.ToString(), "unit12", true) == 0 || string.Compare(cboUnittype.SelectedValue.ToString(), "unit13", true) == 0)
            {
                if (txtOther.Text.Trim() == "")
                {
                    TXMessageBoxExtensions.Info("请填写姓名!");
                    txtOther.Focus();
                    return;
                }
            }
            else
            {
                if (txtDwmc.Text.Trim() == "")
                {
                    TXMessageBoxExtensions.Info("单位名称必须填写!");
                    txtDwmc.Focus();
                    return;
                }
            }


            T_Units_BLL unitBLL   = new T_Units_BLL();
            T_Units     unitsList = new T_Units();

            unitsList.ProjectNO = ProjectNO;
            unitsList.unittype  = this.cboUnittype.SelectedValue.ToString();
            DataSet ds = unitBLL.GetList(unitsList);

            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TXMessageBoxExtensions.Info("该工程已经存在相同类型单位,不能重复添加!");
                    return;
                }
            }

            this.DialogResult = DialogResult.OK;
        }
Ejemplo n.º 7
0
 public void Add(T_Units obj)
 {
     Insert(obj);
 }