当前位置: 首页>>代码示例>>C#>>正文


C# BaseService.UpdateData方法代码示例

本文整理汇总了C#中BaseService.UpdateData方法的典型用法代码示例。如果您正苦于以下问题:C# BaseService.UpdateData方法的具体用法?C# BaseService.UpdateData怎么用?C# BaseService.UpdateData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseService的用法示例。


在下文中一共展示了BaseService.UpdateData方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetStatusSelected

 public void SetStatusSelected(string selectedIds, string status)
 {
     if (!string.IsNullOrEmpty(selectedIds))
     {
         selectedIds = Common.DotNetToOracle(selectedIds);
         BaseService service = new BaseService();
         string statusMessages = string.Empty;
         List<object> lstObj = new List<object>();
         lstObj.Add(selectedIds);
         lstObj.Add(status);
         service.UpdateData<Att_LeaveDayModel>(lstObj, ConstantSql.hrm_att_sp_get_Leaveday_UpdateStatus, ref statusMessages);
     }
 }
开发者ID:dtafe,项目名称:vnr,代码行数:13,代码来源:Att_LeavedayController.cs

示例2: Put

 public Lau_LaundryRecordModel Put([Bind]Lau_LaundryRecordModel model)
 {
     model.ProfileIDs = Common.DotNetToOracle(model.ProfileIDs);
     BaseService service = new BaseService();
     string status = string.Empty;
     List<object> lstObj = new List<object>();
     lstObj.Add(model.ProfileIDs);
     lstObj.Add(model.Status);
     var rs = service.UpdateData<Lau_LaundryRecordModel>(lstObj, ConstantSql.hrm_att_sp_get_LaundryRecord_UpdateStatus, ref status);
     if (rs != null)
     {
         return model;
     }
     return null;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:15,代码来源:Lau_LaundryRecordController.cs

示例3: Put

        /// <summary>
        /// [Hieu.Van] Update status 
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        //[System.Web.Mvc.HttpPost]
        //[System.Web.Mvc.RouteAttribute("api/Att_Overtime")]
        public Att_OvertimeModel Put([Bind]Att_OvertimeModel model)
        {
            model.ProfileIds = Common.DotNetToOracle(model.ProfileIds);
            BaseService service = new BaseService();
            string status = string.Empty;
           
            List<object> lstObj = new List<object>();
            if (string.IsNullOrEmpty(model.Status) && string.IsNullOrEmpty(model.MethodPayment))
            {
                lstObj.AddRange(new object[2]);
                lstObj[0] = model.ProfileIds;
                lstObj[1] = model.IsNonOvertime;
                var rs = new List<Att_OvertimeModel>();
                rs = service.UpdateData<Att_OvertimeModel>(lstObj, ConstantSql.Att_sp_Set_Overtime_AllowOvertime, ref status);
                model.ActionStatus = status;
                return model;
            }
            else
            {
                lstObj.AddRange(new object[3]);
                lstObj[0] = model.ProfileIds;
                lstObj[1] = model.Status;
                lstObj[2] = model.MethodPayment;
                var rs = new List<Att_OvertimeModel>();
                if (model.MethodPayment == "E_CASHOUT" || model.MethodPayment == "E_TIMEOFF")
                {
                    #region Change MethodPayment
                    rs = service.UpdateData<Att_OvertimeModel>(lstObj, ConstantSql.hrm_att_sp_Set_Overtime_Payment, ref status);
                    model.ActionStatus = status;
                    #endregion
                }
                else
                {
                    #region  không cho phép duyệt ot cho bản thân 
                    var checkConfigApp = service.GetData<Sys_AllSettingModel>(AppConfig.HRM_ATT_OT_DONOTAPPROVEOTMYSELF.ToString(), ConstantSql.hrm_sys_sp_get_AllSettingByKey,UserLogin, ref status);
                    var checkUserLG = service.GetData<Sys_UserModel>(model.UserApproveID, ConstantSql.hrm_sys_sp_get_UserbyId,UserLogin, ref status);
                    bool APPROVEOTMYSELF = false;

                    Guid? ProIDofUserLG = checkUserLG.Select(s => s.ProfileID).FirstOrDefault();
                    if (ProIDofUserLG != null && ProIDofUserLG != Guid.Empty)
                    {
                        if (checkConfigApp != null && checkConfigApp.Select(s => s.Value1).FirstOrDefault() == bool.TrueString)
                        {
                            APPROVEOTMYSELF = true;
                        }
                    }
                    #endregion

                    #region Change Status
                    var lstCheck = service.GetData<Att_RosterModel>(model.ProfileIds, ConstantSql.hrm_att_sp_get_OvertimeByIds,UserLogin, ref status);
                    if (status == NotificationType.Success.ToString())
                        status = "";
                    else
                    {
                        model.ActionStatus = status;
                        return model;
                    }
                    string lstFirstApprove = "";
                    string lstNormal = "";
                    foreach (var item in lstCheck)
                    {
                        if (APPROVEOTMYSELF == true && ProIDofUserLG == item.ProfileID)
                        {
                            model.ActionStatus = "NoApproveOTMySelf";
                            return model;
                        }
                        if (item.UserApproveID != model.UserApproveID && item.UserApproveID2 != model.UserApproveID2)
                        {
                            model.ActionStatus = "NoPermission";
                            return model;
                        }
                        if (model.Status == AttendanceDataStatus.E_APPROVED.ToString())
                        {
                            if (item.UserApproveID == model.UserApproveID)
                                lstFirstApprove += Common.DotNetToOracle(item.ID.ToString()) + ",";
                            if (item.UserApproveID2 == model.UserApproveID2 && (item.Status == AttendanceDataStatus.E_FIRST_APPROVED.ToString() || item.UserApproveID == model.UserApproveID))
                                lstNormal += Common.DotNetToOracle(item.ID.ToString()) + ",";
                        }
                        else
                            if (model.Status == AttendanceDataStatus.E_WAIT_APPROVED.ToString())
                            {
                                if (item.UserApproveID == model.UserApproveID)
                                    lstNormal += Common.DotNetToOracle(item.ID.ToString()) + ",";
                            }
                            else
                                lstNormal += Common.DotNetToOracle(item.ID.ToString()) + ",";

                        //if (item.UserApproveID2 == model.UserApproveID2 && (item.Status == AttendanceDataStatus.E_FIRST_APPROVED.ToString() || item.UserApproveID == model.UserApproveID))
                        //{
                        //    lstFirstApprove += Common.DotNetToOracle(item.ID.ToString()) + ",";
                        //}
                        //else
                        //{
//.........这里部分代码省略.........
开发者ID:dtafe,项目名称:vnr,代码行数:101,代码来源:Att_OvertimeController.cs

示例4: SetStatusHire

        public ActionResult SetStatusHire(string selectedIds, string statusPofile, string statusBasicSalary, string statusWorkHistory, string statusContract)
        {
            string status = string.Empty;
            BaseService service = new BaseService();
            ActionService ActionService = new ActionService(UserLogin);
            List<object> lstObj = new List<object>();
            lstObj.Add(Common.DotNetToOracle(selectedIds));
            lstObj.Add(statusPofile);
            lstObj.Add(statusBasicSalary);
            lstObj.Add(statusWorkHistory);
            lstObj.Add(statusContract);
            var rs = service.UpdateData<Hre_ProfileModel>(lstObj, ConstantSql.hrm_hre_sp_Set_ApproveProfile_Status, ref status);

            var contractServices = new Hre_ContractServices();
            var objContract = new List<object>();
            objContract.AddRange(new object[21]);
            objContract[19] = 1;
            objContract[20] = int.MaxValue - 1;
            var lstContract = ActionService.GetData<Hre_ContractEntity>(objContract, ConstantSql.hrm_hr_sp_get_Contract, ref status).ToList();

            var lstProfileIDs = selectedIds.Split(',').Select(s => Guid.Parse(s)).ToArray();
            if (lstProfileIDs != null)
            {
                foreach (var item in lstProfileIDs)
                {
                    var lstContractByProfileID = lstContract.Where(s => s.Status == EnumDropDown.Status.E_APPROVED.ToString() && item == s.ProfileID).ToList();

                    var contractEntity = lstContract.Where(s => s.ProfileID == item).OrderByDescending(s => s.DateUpdate).FirstOrDefault();
                    var listIdContract = string.Empty;
                    if (lstContractByProfileID != null)
                    {
                        listIdContract = string.Join(",", lstContractByProfileID.Select(d => d.ContractTypeID));
                        if (contractEntity != null)
                        {
                            contractEntity = SetNewCodeContract(contractEntity, listIdContract);
                            contractEntity.Status = EnumDropDown.Status.E_APPROVED.ToString();
                            status = contractServices.Edit(contractEntity);
                        }
                    }

                }
            }

            if (status != "")
            {
                return Json(status);
            }
            return Json("");
        }
开发者ID:dtafe,项目名称:vnr,代码行数:49,代码来源:Hre_GetDataController.cs

示例5: Put

        public Sal_BasicSalaryModel Put([Bind]Sal_BasicSalaryModel model)
        {            
            if (!string.IsNullOrEmpty(model.IDs))
            {
                try
                {
                    model.IDs = Common.DotNetToOracle(model.IDs);
                    BaseService service = new BaseService();
                    string statusMessages = string.Empty;
                    List<object> lstObj = new List<object>();
                    lstObj.Add(model.IDs);
                    lstObj.Add(model.Status);
                    service.UpdateData<Sal_BasicSalaryModel>(lstObj, ConstantSql.hrm_sal_sp_get_BasicSalary_UpdateStatus, ref statusMessages);
                    model.ActionStatus = statusMessages;
                }
                catch (Exception)
                {
                    
                    throw;
                }
                
            }
            return model;

        }
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Sal_BasicSalaryController.cs

示例6: Put

        public Att_RosterModel Put([Bind]Att_RosterModel model)
        {
            model.ProfileIds = Common.DotNetToOracle(model.ProfileIds);
            BaseService service = new BaseService();
            string status = string.Empty;
            var lstCheck = service.GetData<Att_RosterModel>(model.ProfileIds, ConstantSql.hrm_att_sp_get_RosterByIds,UserLogin, ref status);
            foreach (var item in lstCheck)
            {
                if (item.UserApproveID != model.UserApproveID && item.UserApproveID2 != model.UserApproveID2)
                {
                    model.ActionStatus = "NoPermission";
                    return model;
                }
            }

            List<object> lstObj = new List<object>();
            lstObj.Add(model.ProfileIds);
            lstObj.Add(model.Status);
            var rs = service.UpdateData<Att_RosterModel>(lstObj, ConstantSql.hrm_att_sp_Set_Roster_Status, ref status);
            if (rs != null)
            {
                return model;
            }
            return null;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:25,代码来源:Att_RosterController.cs

示例7: Put

 /// <summary>
 /// [Hieu.Van] Update status 
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public Att_WorkdayModel Put(Att_WorkdayModel model)
 {
     model.ProfileIds = Common.DotNetToOracle(model.ProfileIds);
     BaseService service = new BaseService();
     string status = string.Empty;
     List<object> lstObj = new List<object>();
     lstObj.Add(model.ProfileIds);
     List<Att_WorkdayModel> rs = null;
     if (model.Status == "UpdateInOut")
     {
         rs = service.UpdateData<Att_WorkdayModel>(lstObj, ConstantSql.hrm_att_sp_set_WorkDay_addInOut, ref status);
     }
     if (model.Status == "ChangeInOut")
     {
         rs = service.UpdateData<Att_WorkdayModel>(lstObj, ConstantSql.hrm_att_sp_set_WorkDay_ChangeInOut, ref status);
     }
     if (model.Status == "CancelLateEarly")
     {
         lstObj.Add(0);
         rs = service.UpdateData<Att_WorkdayModel>(lstObj, ConstantSql.hrm_att_sp_set_WorkDay_LateEarlyDuration, ref status);
     }
     if (model.Status == AttendanceDataStatus.E_WAIT_APPROVED.ToString() || model.Status == AttendanceDataStatus.E_APPROVED.ToString())
     {
         lstObj.Add(model.Status);
         rs = service.UpdateData<Att_WorkdayModel>(lstObj, ConstantSql.hrm_att_sp_get_WorkDay_UpdateStatus, ref status);
     }
     model.ActionStatus = status;
     return model;
     //if (rs != null)
     //{
     //    return model;
     //}
     //return null;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:39,代码来源:Att_WorkDayController.cs

示例8: Put

        public Att_LeaveDayModel Put([Bind]Att_LeaveDayModel model)
        {
            model.ProfileIds = Common.DotNetToOracle(model.ProfileIds);

            BaseService service = new BaseService();
            string status = string.Empty;
            List<object> lstObj = new List<object>();
            lstObj.AddRange(new object[2]);
            var lstCheck = service.GetData<Att_LeaveDayModel>(model.ProfileIds, ConstantSql.hrm_att_sp_get_LeavedayByIds, UserLogin, ref status);
            string lstFirstApprove = "";
            string lstNormal = "";
            foreach (var item in lstCheck)
            {
                if (item.UserApproveID != model.UserApproveID && item.UserApproveID2 != model.UserApproveID2)
                {
                    model.ActionStatus = "NoPermission";
                    return model;
                }
                if (item.UserApproveID2 == model.UserApproveID2 && (item.Status == AttendanceDataStatus.E_FIRST_APPROVED.ToString() || item.UserApproveID == model.UserApproveID))
                {
                    lstFirstApprove += Common.DotNetToOracle(item.ID.ToString()) + ",";
                }
                else
                {
                    lstNormal += Common.DotNetToOracle(item.ID.ToString()) + ",";
                }
            }
            if (lstFirstApprove != "")
            {
                lstFirstApprove = lstFirstApprove.Substring(0, lstFirstApprove.Length - 1);
                lstObj[0] = lstFirstApprove;
                lstObj[1] = model.Status;
                service.UpdateData<Att_LeaveDayModel>(lstObj, ConstantSql.hrm_att_sp_get_Leaveday_UpdateStatus, ref status);
            }
            if (lstNormal != "")
            {
                lstNormal = lstNormal.Substring(0, lstNormal.Length - 1);
                lstObj[0] = lstNormal;
                lstObj[1] = model.Status;
                if (model.Status == AttendanceDataStatus.E_APPROVED.ToString())
                    lstObj[1] = AttendanceDataStatus.E_FIRST_APPROVED.ToString();
                service.UpdateData<Att_LeaveDayModel>(lstObj, ConstantSql.hrm_att_sp_get_Leaveday_UpdateStatus, ref status);
            }
            if (status == "")
                status = "NoPermission";
            //foreach (var item in lstCheck)
            //{
            //    if (item.UserApproveID != model.UserApproveID && item.UserApproveID2 != model.UserApproveID2)
            //    {
            //        model.ActionStatus = "NoPermission";
            //        return model;
            //    }
            //}
            //lstObj.Add(model.ProfileIds);
            //lstObj.Add(model.Status);
            //var rs = service.UpdateData<Att_LeaveDayModel>(lstObj, ConstantSql.hrm_att_sp_get_Leaveday_UpdateStatus, ref status);
            model.ActionStatus = status;
            return model;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:59,代码来源:Att_LeavedayController.cs

示例9: Put

 public Att_RosterGroupModel Put([Bind]Att_RosterGroupModel model)
 {
     BaseService service = new BaseService();
     string status = string.Empty;
     List<object> lstObj = new List<object>();
     lstObj.Add(model.ProfileIds);
     lstObj.Add(model.Status);
     var rs = service.UpdateData<Att_RosterGroupModel>(lstObj, ConstantSql.hrm_att_sp_Set_RosterGroup_Status, ref status);
     if (rs != null)
     {
         return model;
     }
     return null;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:14,代码来源:Att_RosterGroupController.cs

示例10: Put

 public Rec_CandidateModel Put([Bind]Rec_CandidateModel model)
 {
     model.ProfileIds = Common.DotNetToOracle(model.ProfileIds);
     BaseService service = new BaseService();
     string status = string.Empty;
     var lstCheck = service.GetData<Rec_CandidateModel>(model.ProfileIds, ConstantSql.hrm_rec_sp_get_CandidateByIds, UserLogin, ref status);
     List<object> lstObj = new List<object>();
     lstObj.Add(model.ProfileIds);
     lstObj.Add(model.Status);
     var rs = service.UpdateData<Rec_CandidateModel>(lstObj, ConstantSql.hrm_rec_sp_Set_Candidate_Status, ref status);
     if (rs != null)
     {
         return model;
     }
     return null;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:16,代码来源:Rec_CandidateController.cs


注:本文中的BaseService.UpdateData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。