示例#1
0
        private void AddHireRecord()
        {
            //添加租赁记录并将,出租申请的标志改为确定入住
            T_OA_HIRERECORD hirerecord = new T_OA_HIRERECORD();

            hirerecord.HIRERECORD     = System.Guid.NewGuid().ToString();
            hirerecord.RENTER         = hireApp.RENTTYPE;
            hirerecord.T_OA_HIREAPP   = hireApp;
            hirerecord.MANAGECOST     = Convert.ToDecimal(hireApp.MANAGECOST);
            hirerecord.RENTCOST       = Convert.ToDecimal(hireApp.RENTCOST);
            hirerecord.WATER          = 0;
            hirerecord.ELECTRICITY    = 0;
            hirerecord.OTHERCOST      = 0;
            hirerecord.WATERNUM       = 0;
            hirerecord.ELECTRICITYNUM = 0;
            hirerecord.SETTLEMENTDATE = System.DateTime.Now;
            hirerecord.SETTLEMENTTYPE = hireApp.SETTLEMENTTYPE; //付款方式
            hirerecord.ISSETTLEMENT   = "0";                    //是否结算

            hirerecord.CREATEUSERID       = Common.CurrentLoginUserInfo.EmployeeID;
            hirerecord.CREATEUSERNAME     = Common.CurrentLoginUserInfo.EmployeeName;
            hirerecord.CREATEPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
            hirerecord.CREATEDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            hirerecord.CREATECOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            hirerecord.CREATEDATE         = DateTime.Now;

            hirerecord.OWNERID           = Common.CurrentLoginUserInfo.EmployeeID;
            hirerecord.OWNERNAME         = Common.CurrentLoginUserInfo.EmployeeName;
            hirerecord.OWNERPOSTID       = Common.CurrentLoginUserInfo.UserPosts[0].PostID;
            hirerecord.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID;
            hirerecord.OWNERCOMPANYID    = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID;
            client.AddHireRecordAsync(hirerecord);
        }