首页 > 代码库 > PM.Common.Data

PM.Common.Data

DalBudgetControlor.cs

View Code

 

 Entity.BudgetControlor.cs

View Code

 

DalChargeUpInfo.cs

View Code

 

Entity.ChargeUpInfo.cs

View Code

 

DalHistoryAccounts.cs

View Code

 

Entity.HistoryAccounts.cs

View Code

 

DalDimissionForm.cs

View Code

 

Entity.DimissionForm.cs

using System;using Entity.FormManager;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager.HR{    [Serializable]    [Table(Name = "OA_Form_HR_Dimission")]    public class DimissionForm : FormBase    {        private string _dimissionReason = null;        private DateTime _expectDate = DateTime.Now;        private string _unitId = null;        private string _userId = null;        private string _id = Guid.NewGuid().ToString();        [Id(Name = "DimissionFormID")]        public string ID        {            get            {                return this._id;            }            set            {                this._id = value;            }        }        [Column]        public string DimissionReason        {            get            {                return this._dimissionReason;            }            set            {                this._dimissionReason = value;            }        }        [Column]        public string DimissionUserID        {            get            {                return this._userId;            }            set            {                this._userId = value;            }        }        [Column]        public DateTime ExpectDate        {            get            {                return this._expectDate;            }            set            {                this._expectDate = value;            }        }        [Column]        public string LocationUnitID        {            get            {                return this._unitId;            }            set            {                this._unitId = value;            }        }        public override FormType Type        {            get            {                return FormType.DimissionForm;            }        }    }}
View Code

 

Entity.FormBase.cs

using System;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager{    public abstract class FormBase    {        private DateTime _createDate = DateTime.Now;        private string _createUser = null;        private string _formCode = null;        private string _formOrder = null;                private short _urgencyDegree = 1;        protected FormBase()        {        }        [Column]        public DateTime CreateTime        {            get            {                return this._createDate;            }            set            {                this._createDate = value;            }        }        [Column]        public string CreateUser        {            get            {                return this._createUser;            }            set            {                this._createUser = value;            }        }        [Column]        public string FormCode        {            get            {                return this._formCode;            }            set            {                this._formCode = value;            }        }        [Column]        public string FormOrder        {            get            {                return this._formOrder;            }            set            {                this._formOrder = value;            }        }                public abstract FormType Type { get; }        [Column]        public short UrgencyDegree        {            get            {                return this._urgencyDegree;            }            set            {                this._urgencyDegree = value;            }        }    }}
View Code

 

DalEmployeeForm.cs

using Entity.FormManager.HR;using Global.PM.Common;using Global.Utils.ORM;using Global.Utils.ORM.Common;using Global.Utils;using System;using System.Data;using System.Collections;using System.Collections.Generic;using System.Data.SqlClient;using Persistence;namespace Persistence.DAL.FormManager{    public class DalEmployeeForm    {        private DBHelper dbHelper = null;        public DalEmployeeForm()        {            dbHelper = new DBHelper();        }        public int DeleteEmployeeForm(string id)        {            return dbHelper.Remove<EmployeeForm>(id);        }        public EmployeeForm GetEmployeeForm(string id)        {            return dbHelper.FindById<EmployeeForm>(id);        }        public IList GetEmployeeFormList()        {            return dbHelper.FindAll<EmployeeForm>();        }        public int GetMaxFormNo()        {            string sql = "SELECT MAX(CAST(SUBSTRING(EmployeeFormNo,3,6) as int)) FROM OA_Form_HR_Employee";            object obj2 = SqlHelper.ExecuteScalar(AppConfiguration.ConnectionString, CommandType.Text, sql);            if (obj2 != null)            {                return int.Parse(obj2.ToString());            }            return 0;        }        public int GetRecordCount()        {            return dbHelper.FindCount<EmployeeForm>();        }        public void InsertEmployeeForm(EmployeeForm _employeeForm)        {            dbHelper.Save<EmployeeForm>(_employeeForm);        }        public void UpdateEmployeeForm(EmployeeForm _employeeForm)        {            dbHelper.Update<EmployeeForm>(_employeeForm);        }    }}
View Code

 

Entity.EmployeeForm.cs

using System;using Entity.FormManager;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager.HR{    [Serializable]    [Table(Name = "OA_Form_HR_Employee")]    public class EmployeeForm : FormBase    {        private int _employeeID = 0;        private string _employeePosition = string.Empty;        private string _employeeUnitID = string.Empty;        private string _expectSalary = string.Empty;        private string _inauguralDate = string.Empty;        private string _id = Guid.NewGuid().ToString();        [Id(Name = "EmployeeFormID")]        public string ID        {            get            {                return this._id;            }            set            {                this._id = value;            }        }        [Column]        public int EmployeeID        {            get            {                return this._employeeID;            }            set            {                this._employeeID = value;            }        }        [Column]        public string EmployeePosition        {            get            {                return this._employeePosition;            }            set            {                this._employeePosition = value;            }        }        [Column]        public string EmployeeUnitID        {            get            {                return this._employeeUnitID;            }            set            {                this._employeeUnitID = value;            }        }        [Column]        public string ExpectSalary        {            get            {                return this._expectSalary;            }            set            {                this._expectSalary = value;            }        }        [Column]        public string InauguralDate        {            get            {                return this._inauguralDate;            }            set            {                this._inauguralDate = value;            }        }        public override FormType Type        {            get            {                return FormType.EmployeeForm;            }        }    }}
View Code

 

DalOrderForm.cs

using Entity.FormManager;using Global.PM.Common;using Global.Utils.ORM;using Global.Utils.ORM.Common;using Global.Utils;using System;using System.Data;using System.Collections;using System.Collections.Generic;using System.Data.SqlClient;using Persistence;namespace Persistence.DAL.FormManager{    public class DalOrderForm    {        private DBHelper dbHelper = null;        public DalOrderForm()        {            dbHelper = new DBHelper();        }        public int DeleteOrderForm(string id)        {            return dbHelper.Remove<OrderForm>(id);        }        public int GetMaxOrder()        {            string sql = "select max(cast(substring(OrderFormNo,3,6) as int))  as OrderFormNo from OA_T_OrderForm";            object obj2 = SqlHelper.ExecuteScalar(AppConfiguration.ConnectionString, CommandType.Text, sql);            if (obj2 != null)            {                return int.Parse(obj2.ToString());            }            return 0;        }        public OrderForm GetOrderForm(string id)        {            return dbHelper.FindById<OrderForm>(id);        }        public IList GetOrderFormList()        {            return dbHelper.FindAll<OrderForm>();        }        public void InsertOrderForm(OrderForm _orderForm)        {            dbHelper.Save<OrderForm>(_orderForm);        }        public void UpdateOrderForm(OrderForm _orderForm)        {            dbHelper.Update<OrderForm>(_orderForm);        }    }}
View Code

 

Entity.OrderForm.cs

using System;using System.IO;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager{    [Serializable]    [Table(Name = "OA_T_OrderForm")]    public class OrderForm    {        private string _attachmentName = null;        private string _attachmentUrl = null;        private DateTime _completeTime = DateTime.Now;        private string _correlationCompany = null;        private DateTime _createFormDate = DateTime.Now;        private string _createUserID = null;        private string _joinUserXML = null;        private string _orderContent = null;        private DateTime _orderFormDate = DateTime.Now;        private string _orderFormID = null;        private string _orderFormNo = null;        private int _orderFormOrder = 0;        private string _projectID = null;        private int _urgencyDegree = 0;        [Column]        public string AttachmentName        {            get            {                return this._attachmentName;            }            set            {                this._attachmentName = value;            }        }        public string AttachmentURL        {            get            {                return this._attachmentUrl;            }            set            {                this._attachmentUrl = value;                this.AttachmentName = Path.GetFileName(this._attachmentUrl);            }        }        [Column]        public DateTime CompleteTime        {            get            {                return this._completeTime;            }            set            {                this._completeTime = value;            }        }        [Column]        public string CorrelationCompany        {            get            {                return this._correlationCompany;            }            set            {                this._correlationCompany = value;            }        }        [Column]        public DateTime CreateFormDate        {            get            {                return this._createFormDate;            }            set            {                this._createFormDate = value;            }        }        [Column]        public string CreateUserID        {            get            {                return this._createUserID;            }            set            {                this._createUserID = value;            }        }        public string FormTypeID        {            get            {                return "21";            }        }        [Column]        public string JoinUserXML        {            get            {                return this._joinUserXML;            }            set            {                this._joinUserXML = value;            }        }        [Column]        public string OrderContent        {            get            {                return this._orderContent;            }            set            {                this._orderContent = value;            }        }        [Column]        public DateTime OrderFormDate        {            get            {                return this._orderFormDate;            }            set            {                this._orderFormDate = value;            }        }        [Id]        public string OrderFormID        {            get            {                return this._orderFormID;            }            set            {                this._orderFormID = value;            }        }        [Column]        public string OrderFormNo        {            get            {                return this._orderFormNo;            }            set            {                this._orderFormNo = value;            }        }        [Column]        public int OrderFormOrder        {            get            {                return this._orderFormOrder;            }            set            {                this._orderFormOrder = value;            }        }        [Column]        public string ProjectID        {            get            {                return this._projectID;            }            set            {                this._projectID = value;            }        }        [Column]        public int UrgencyDegree        {            get            {                return this._urgencyDegree;            }            set            {                this._urgencyDegree = value;            }        }    }}
View Code

 

DalWorkManeuveForm.cs

using Entity.FormManager;using Global.PM.Common;using Global.Utils.ORM;using Global.Utils.ORM.Common;using Global.Utils;using System;using System.Data;using System.Collections;using System.Collections.Generic;using System.Data.SqlClient;using Persistence;namespace Persistence.DAL.FormManager{    public class DalWorkManeuveForm    {        private DBHelper dbHelper = null;        public DalWorkManeuveForm()        {            dbHelper = new DBHelper();        }                public int DeleteWorkManeuveForm(string id)        {            return dbHelper.Remove<WorkManeuveForm>(id);        }        public int GetMaxOrder()        {            string sql = "select max(cast(substring(ManeuveFormNo,3,6) as int))   as ManeuveFormNo from OA_T_WorkManeuveForm";            object obj2 = SqlHelper.ExecuteScalar(AppConfiguration.ConnectionString, CommandType.Text, sql);            if (obj2 != null)            {                return int.Parse(obj2.ToString());            }            return 0;        }        public WorkManeuveForm GetWorkManeuveForm(string id)        {            return dbHelper.FindById<WorkManeuveForm>(id);        }        public IList GetWorkManeuveFormList()        {            return dbHelper.FindAll<WorkManeuveForm>();        }        public void InsertWorkManeuveForm(WorkManeuveForm _workManeuveForm)        {            dbHelper.Save<WorkManeuveForm>(_workManeuveForm);        }        public void UpdateWorkManeuveForm(WorkManeuveForm _workManeuveForm)        {            dbHelper.Update<WorkManeuveForm>(_workManeuveForm);        }    }}
View Code

 

Entity.WorkManeuveForm.cs

using System;using System.IO;using Entity.FormManager;using Global.Utils.ORM.CustomAttributes;namespace Entity.FormManager{    [Serializable]    [Table(Name = "OA_T_WorkManeuveForm")]    public class WorkManeuveForm    {        private string _attachmentName = null;        private string _attachmentUrl = null;        private DateTime _completeTime = DateTime.Now;        private string _correlationCompany = null;        private DateTime _createFormDate = DateTime.Now;        private string _createUserID = null;        private string _joinUserXML = null;        private string _maneuveContent = null;        private DateTime _maneuveFormDate = DateTime.Now;        private string _maneuveFormID = null;        private string _maneuveFormNo = null;        private int _maneuveFormOrder = 0;        private string _projectID = null;        private int _urgencyDegree = 0;        [Column]        public string AttachmentName        {            get            {                return this._attachmentName;            }            set            {                this._attachmentName = value;            }        }        public string AttachmentURL        {            get            {                return this._attachmentUrl;            }            set            {                this._attachmentUrl = value;                this.AttachmentName = Path.GetFileName(this._attachmentUrl);            }        }        [Column]        public DateTime CompleteTime        {            get            {                return this._completeTime;            }            set            {                this._completeTime = value;            }        }        [Column]        public string CorrelationCompany        {            get            {                return this._correlationCompany;            }            set            {                this._correlationCompany = value;            }        }        [Column]        public DateTime CreateFormDate        {            get            {                return this._createFormDate;            }            set            {                this._createFormDate = value;            }        }        [Column]        public string CreateUserID        {            get            {                return this._createUserID;            }            set            {                this._createUserID = value;            }        }        public string FormTypeID        {            get            {                return "22";            }        }        [Column]        public string JoinUserXML        {            get            {                return this._joinUserXML;            }            set            {                this._joinUserXML = value;            }        }        [Column]        public string ManeuveContent        {            get            {                return this._maneuveContent;            }            set            {                this._maneuveContent = value;            }        }        [Column]        public DateTime ManeuveFormDate        {            get            {                return this._maneuveFormDate;            }            set            {                this._maneuveFormDate = value;            }        }        [Id(Name = "ManeuveFormID")]        public string ManeuveFormID        {            get            {                return this._maneuveFormID;            }            set            {                this._maneuveFormID = value;            }        }        [Column]        public string ManeuveFormNo        {            get            {                return this._maneuveFormNo;            }            set            {                this._maneuveFormNo = value;            }        }        [Column]        public int ManeuveFormOrder        {            get            {                return this._maneuveFormOrder;            }            set            {                this._maneuveFormOrder = value;            }        }        [Column]        public string ProjectID        {            get            {                return this._projectID;            }            set            {                this._projectID = value;            }        }        [Column]        public int UrgencyDegree        {            get            {                return this._urgencyDegree;            }            set            {                this._urgencyDegree = value;            }        }    }}
View Code