Пример #1
0
 /// <summary>
 /// Method is Used To get the User details for HidoctorStartDate
 /// </summary>
 /// <returns></returns>
 private IEnumerable <MVCModels.HiDoctor_Master.UserModel> GetHidoctorStartDate()
 {
     try
     {
         MVCModels.HiDoctor_Master.UserModel objHidoctorstartdate = new MVCModels.HiDoctor_Master.UserModel();
         BLMaster objMaster = new BLMaster();
         objHidoctorstartdate.Company_Code = _objcurrentInfo.GetCompanyCode();
         return(objMaster.GetHidoctorStartdateDetails(objHidoctorstartdate));
     }
     catch (Exception ex)
     {
         Dictionary <string, string> dicObj = new Dictionary <string, string>();
         DataControl.Impl.ExceptionHandler.WriteLog(ex, dicObj);
         return(null);
     }
 }
Пример #2
0
        /// <summary>
        /// Method is Used to Bind the data with Hidoctorstartdate Html Table
        /// </summary>
        /// <returns></returns>
        public JsonResult HtmlforHidoctorStartDate()
        {
            try
            {
                List <MVCModels.HiDoctor_Master.UserModel> lsthidoctorUser = (List <MVCModels.HiDoctor_Master.UserModel>)GetHidoctorStartDate();
                StringBuilder sb = new StringBuilder();
                MVCModels.HiDoctor_Master.UserModel objHidoctorstartdate = new MVCModels.HiDoctor_Master.UserModel();
                BLMaster objMaster = new BLMaster();
                objHidoctorstartdate.Company_Code = _objcurrentInfo.GetCompanyCode();
                List <MVCModels.HiDoctor_Master.UserModel> lstUserName = objMaster.GetHidoctorStartdate(objHidoctorstartdate).ToList();

                DataControl.JSONConverter _objJson = new DataControl.JSONConverter();
                return(Json(lsthidoctorUser, JsonRequestBehavior.AllowGet));
                //return _objJson.Serialize(lstUserName);
            }
            catch (Exception ex)
            {
                //Dictionary<string, string> dicObj = new Dictionary<string, string>();
                //DataControl.Impl.ExceptionHandler.WriteLog(ex, dicObj);
                //return ex.Message.ToString();
                throw (ex);
            }
        }
Пример #3
0
        /// <summary>
        /// Insert data
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="userCode"></param>
        /// <returns></returns>



        public string UpdateHidoctorStartDate(string startDate, string userCode)
        {
            try
            {
                //var companycode =   companycode;
                // var companycode = new Companycode();

                string[] userArr = userCode.Split('^');
                BLMaster Master  = new BLMaster();
                List <MVCModels.HiDoctor_Master.UserModel> lstUser = new List <MVCModels.HiDoctor_Master.UserModel>();
                foreach (string userCodesplit in userArr)
                {
                    if (!string.IsNullOrEmpty(userCodesplit))
                    {
                        MVCModels.HiDoctor_Master.UserModel objusermasterModer = new MVCModels.HiDoctor_Master.UserModel();
                        objusermasterModer.Company_Code        = _objcurrentInfo.GetCompanyCode();
                        objusermasterModer.HiDOCTOR_Start_Date = startDate;
                        objusermasterModer.User_Code           = userCodesplit;
                        objusermasterModer.Updated_By          = _objcurrentInfo.GetUserCode();
                        objusermasterModer.Updated_Time        = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:fff");
                        lstUser.Add(objusermasterModer);
                    }
                }

                string result = Master.UpdateforHidoctorStartDate(lstUser);
                return(result);
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                dicContext.Add("Filter:startDate", startDate);
                dicContext.Add("Filter:userCode", userCode);
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return("success");
            }
        }