示例#1
0
        public int DeleteApprovalType(string approvalCode)
        {
            int i = 0;

            using (OleDbCommand command = new OleDbCommand())
            {
                i = ExecuteNonQuery(ApprovalTypeStringsInner.DeleteApprovalType(approvalCode));
            }

            return(i);
        }
示例#2
0
        public ApprovalTypeModel UpdateApprovalType(ApprovalTypeModel approvalTypeModel)
        {
            int i = -1;

            using (OleDbCommand command = new OleDbCommand())
            {
                i = ExecuteNonQuery(ApprovalTypeStringsInner.UpdateApprovalType(approvalTypeModel));
            }

            return(GetOneApprovalTypeByCode(approvalTypeModel.approvalCode));
        }
示例#3
0
        public ApprovalTypeModel GetOneApprovalTypeByCode(string approvalCode)
        {
            DataTable         dt = new DataTable();
            ApprovalTypeModel approvalModelType = new ApprovalTypeModel();

            using (OleDbCommand command = new OleDbCommand())
            {
                dt = GetMultipleQuery(ApprovalTypeStringsInner.GetOneApprovalTypeByCode(approvalCode));
            }
            foreach (DataRow ms in dt.Rows)
            {
                approvalModelType = ApprovalTypeModel.ToObject(ms);
            }
            return(approvalModelType);
        }
示例#4
0
        public List <ApprovalTypeModel> GetAllApprovalTypes()
        {
            DataTable dt = new DataTable();
            List <ApprovalTypeModel> arrApprovalType = new List <ApprovalTypeModel>();

            using (OleDbCommand command = new OleDbCommand())
            {
                dt = GetMultipleQuery(ApprovalTypeStringsInner.GetAllApprovalTypes());
            }
            foreach (DataRow ms in dt.Rows)
            {
                arrApprovalType.Add(ApprovalTypeModel.ToObject(ms));
            }
            return(arrApprovalType);
        }