Example #1
0
        public ActionResult DoctorsReason(string Lid)
        {
            if (Lid == null)
            {
                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                //ViewBag.SelectedRegionCode = _objCurrentInfo.GetSRegionCode();
                ViewBag.CompanyId    = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive = "NO";
            }
            else
            {
                string parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
                MVCModels.DoctorMissedReason.ParameterMode dd = Newtonsoft.Json.JsonConvert.DeserializeObject <MVCModels.DoctorMissedReason.ParameterMode>(parameters);


                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                //ViewBag.SelectedRegionCode = _objCurrentInfo.GetSRegionCode();
                ViewBag.CompanyId    = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive = "YES";
            }
            return(View());
        }
Example #2
0
        public ActionResult PSAndSSSalesEntry(string Lid)
        {
            //string parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
            //ParameterMode obj = Newtonsoft.Json.JsonConvert.DeserializeObject<ParameterMode>(parameters);
            if (Lid == null)
            {
                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                ViewBag.CompanyId       = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive    = "No";
            }
            else
            {
                string parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(Lid));
                MVCModels.PSAndSSSalesEntry.ParameterMode dd = Newtonsoft.Json.JsonConvert.DeserializeObject <MVCModels.PSAndSSSalesEntry.ParameterMode>(parameters);


                ViewBag.subDomainName   = dd.SubDomain_Name;
                ViewBag.CompanyCode     = dd.Company_Code;
                ViewBag.LoginRegionCode = dd.Region_Code;
                ViewBag.LoginUserCode   = dd.User_Code;
                ViewBag.CompanyId       = dd.Company_Id;
                ViewBag.IsResponsive    = "YES";
            }
            return(View());
        }
Example #3
0
        // GET: /DCRStockiestExpense/Create
        public ActionResult Create(string dcrDate, string dcrStatus, string entity, string travelkm, string isRCPA, string accRegions, string flag, string actvity, string cpCode, string tpCode)
        {
            string[] viewArray = new string[6];
            viewArray[0] = dcrDate;
            viewArray[1] = dcrStatus;
            viewArray[2] = entity;
            viewArray[3] = travelkm;
            viewArray[4] = _objCurr.GetDCRCode(dcrDate);
            viewArray[5] = flag;

            ViewBag.isrcpa     = isRCPA;
            ViewBag.userCode   = _objCurr.GetUserCode();
            ViewBag.accRegions = accRegions;
            ViewBag.activity   = actvity;
            ViewBag.CPCode     = cpCode;
            ViewBag.TPCode     = tpCode;

            ViewBag.viewArray = viewArray;
            if (DataControl.CurrentInfo.IsMobile(Request.UserAgent))
            {
                return(View("Create.Mobile"));
            }
            else
            {
                return(View());
            }
        }
Example #4
0
 public ActionResult BatchCreation()
 {
     ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
     ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
     ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
     return(View());
 }
Example #5
0
        // Messages
        public int GetUnreadMessageCount()
        {
            int msgCount = 0;

            DataControl.BLMessaging objMsg = new DataControl.BLMessaging();
            msgCount = objMsg.GetUnreadMessageCount(objCurr.GetCompanyCode(), objCurr.GetUserCode());
            return(msgCount);
        }
Example #6
0
        public ActionResult Index()
        {
            ViewBag.LoginUserCode = _objcurrentInfo.GetUserCode();
            ViewBag.todayDate     = DateTime.Now.ToString("yyyy/MM/dd");
            List <MVCModels.HiDoctor_Master.WeekendGroupModel> lstHolidayMethod = WeekendOffHolidayMethods(_objcurrentInfo.GetCompanyCode());

            ViewBag.holidayMethod = lstHolidayMethod.ToArray();
            return(View());
        }
Example #7
0
        public JsonResult GetApproveOrderlist(FormCollection coll)
        {
            DataSet ds          = new DataSet();
            IOTC    icustDetail = new BAL_OTC();
            string  userCode    = string.Empty;

            userCode = (coll["mode"].ToString() == "ALL") ? _objcurrentInfo.GetUserCode() : coll["userCode"].ToString();
            ds       = icustDetail.GetApproveOrder(_objcurrentInfo.GetCompanyCode(), userCode, coll["mode"].ToString());
            JSONConverter json = new JSONConverter();

            return(Json(json.Serialize(ds), JsonRequestBehavior.AllowGet));
        }
Example #8
0
        public JsonResult CheckTPAvailableForSelectedDCRDates(string DCRDates)
        {
            try
            {
                _objSPData      = new SPData();
                _objcurrentInfo = new CurrentInfo();

                string company_Code = _objcurrentInfo.GetCompanyCode();
                string user_Code    = _objcurrentInfo.GetUserCode();
                string region_Code  = _objcurrentInfo.GetRegionCode();

                List <string> lstDCRDates = _objSPData.CheckTPAvailableForSelectedDCRDates(company_Code, user_Code, region_Code, DCRDates);

                // List<string> DCR_Dates = DCRDates.Split('^').ToList();
                // DCR_Dates = DCR_Dates.Where(d => d != "").ToList();
                // //compare two list and return not matching items using linq
                //List<string> lstDCRDatesWithoutPlan =  DCR_Dates.Except(lstDCRDates).ToList();
                if (lstDCRDates != null)
                {
                    return(Json(lstDCRDates));
                }
                return(null);
            }
            catch
            {
                throw;
            }
        }
Example #9
0
 public ActionResult NewLeaveEntry(string SSID)
 {
     if (!string.IsNullOrEmpty(SSID))
     {
         string         parameters = System.Text.ASCIIEncoding.ASCII.GetString(System.Convert.FromBase64String(SSID));
         DieticianModel obj        = Newtonsoft.Json.JsonConvert.DeserializeObject <DieticianModel>(parameters);
         ViewBag.CompanyCode  = obj.Company_Code;
         ViewBag.RegionCode   = obj.Region_Code;
         ViewBag.UserCode     = obj.User_Code;
         ViewBag.UserTypeCode = obj.User_Type_Code;
         ViewBag.UserName     = obj.User_Name;
         ViewBag.RegionName   = obj.Region_Name;
         ViewBag.latitude     = obj.latitude;
         ViewBag.longitude    = obj.longitude;
     }
     else
     {
         DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
         ViewBag.Companycode  = objCurInfo.GetCompanyCode();
         ViewBag.Usercode     = objCurInfo.GetUserCode();
         ViewBag.RegionCode   = objCurInfo.GetRegionCode();
         ViewBag.UserTypecode = objCurInfo.GetUserTypeCode();
         ViewBag.UserName     = objCurInfo.GetUserName();
     }
     return(View());
 }
Example #10
0
 public ActionResult OBOUserRegionMapping()
 {
     DataControl.CurrentInfo _objcurrentInfo = new DataControl.CurrentInfo();
     ViewBag.Cur_Region_Code = _objcurrentInfo.GetRegionCode();
     ViewBag.Cur_User_Code   = _objcurrentInfo.GetUserCode();
     return(View());
 }
Example #11
0
        /// <summary>
        /// Get the all type message count
        /// </summary>
        /// <returns>retuns the unread, drafted and trash count</returns>
        public string GetMsgCount()
        {
            string unreadCount  = string.Empty;
            string draftedCount = string.Empty;
            string trashCount   = string.Empty;

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            DataControl.BLMessaging objMsg     = new DataControl.BLMessaging();
            try
            {
                DataSet ds = new DataSet();
                ds = objMsg.GetMessageCount(objCurInfo.GetCompanyCode(), objCurInfo.GetUserCode());
                if (ds.Tables.Count > 0)
                {
                    unreadCount = Convert.ToString(ds.Tables[0].Rows[0][0]);
                    if (ds.Tables.Count > 1)
                    {
                        draftedCount = Convert.ToString(ds.Tables[1].Rows[0][0]);
                        if (ds.Tables.Count > 2)
                        {
                            trashCount = Convert.ToString(ds.Tables[2].Rows[0][0]);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
            }
            return(unreadCount + "~" + draftedCount + "~" + trashCount);
        }
Example #12
0
        public string Index(FormCollection form)
        {
            string             result = "";
            HttpPostedFileBase file   = Request.Files[0];

            DataControl.CurrentInfo _objCurInfo   = new DataControl.CurrentInfo();
            MVCModels.RCPA_Header   objrcpaHeader = new MVCModels.RCPA_Header();
            objrcpaHeader.Company_Id   = Convert.ToInt32(_objCurInfo.GetCompanyId());
            objrcpaHeader.Company_code = _objCurInfo.GetCompanyCode();
            objrcpaHeader.user_code    = _objCurInfo.GetUserCode();
            // objrcpaHeader.Region_Code = _objCurInfo.GetRegionCode();
            // objrcpaHeader.PeriodTo = DateTime.Now;
            //objrcpaHeader.PeriodFrom = DateTime.Now;
            try
            {
                DateTime dt = DateTime.ParseExact(Request.Form["txtPeriodFrom"].ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                objrcpaHeader.PeriodFrom = Convert.ToDateTime(dt.ToString("yyyy-MM-dd"));
                dt = DateTime.ParseExact(Request.Form["txtPeriodTo"].ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                objrcpaHeader.PeriodTo    = Convert.ToDateTime(dt);
                objrcpaHeader.Region_Code = Request.Form["hdnRegion_Code"].ToString();
                string subDomain = _objCurInfo.GetSubDomain();
                result            = _objBLRCPACompetator.RCPAExcelBulkAddResult(subDomain, _objCurInfo.GetCompanyCode(), _objCurInfo.GetRegionCode(), Guid.NewGuid().ToString(), file, _objCurInfo.GetUserCode(), objrcpaHeader);
                ViewBag.ErrorCode = result;
                DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
                ViewBag.Companycode = objCurInfo.GetCompanyCode();
                ViewBag.RegionCode  = objCurInfo.GetRegionCode();
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }
            return(result);
        }
Example #13
0
        public int GetDCREntryBasedOnPrivilege(string dcrDate, string flag)
        {
            int result = 1;

            try
            {
                _objSPData      = new SPData();
                _objcurrentInfo = new CurrentInfo();

                string company_Code = _objcurrentInfo.GetCompanyCode();
                string user_Code    = _objcurrentInfo.GetUserCode();
                if (flag == "FIELD" || flag == "FIELD_RCPA")
                {
                    flag = "F";
                }
                else if (flag == "ATTENDANCE")
                {
                    flag = "A";
                }
                else
                {
                    flag = "L";
                }
                result = _objSPData.GetDCREntryBasedOnPrivilege(company_Code, user_Code, dcrDate, flag);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
Example #14
0
        public JsonResult GetUserTypeName()
        {
            DataControl.CurrentInfo _objcurrentInfo   = new DataControl.CurrentInfo();
            DataControl.BLMaster    _objBlmaster      = new DataControl.BLMaster();
            DivisionUserProducts    objDivUserProduct = new DivisionUserProducts();

            objDivUserProduct.Company_Code = _objcurrentInfo.GetCompanyCode();
            objDivUserProduct.User_Code    = _objcurrentInfo.GetUserCode();
            try
            {
                IEnumerable <DivisionUserProducts> lstDiv = _objBlmaster.GetUserTypeNames(objDivUserProduct);
                var division = (from div in lstDiv.AsEnumerable()
                                select new DivisionUserProducts()
                {
                    User_Type_Code = div.User_Type_Code.ToString(),
                    User_Type_Name = div.User_Type_Name.ToString()
                }).ToList <DivisionUserProducts>();
                return(Json(division));
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                dicContext.Add("Filter:companyCode", objDivUserProduct.Company_Code);
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return(Json("Sorry an error occured. Please try again later."));
            }
        }
Example #15
0
 public ActionResult Index()
 {
     _objCurrentInfo      = new CurrentInfo();
     ViewBag.Company_Code = _objCurrentInfo.GetCompanyCode();
     ViewBag.User_Code    = _objCurrentInfo.GetUserCode();
     return(View());
 }
Example #16
0
        /// <summary>
        /// Retrieve the KYD List.
        /// </summary>
        /// <param name="dcrDate"></param>
        /// <param name="Key_Column"></param>
        /// <returns></returns>
        public List <KYDModel> GetKYDCustomerList(string dcrDate, string Key_Column)
        {
            try
            {
                // Creates instance.
                _blKYD   = new BL_KYD();
                _objCurr = new CurrentInfo();

                string company_Code = _objCurr.GetCompanyCode();
                string user_Code    = _objCurr.GetUserCode();

                // Reterievs the KYD Customer list.
                IEnumerable <KYDModel> IlstKYDCustomers = _blKYD.GetKYDCustomerList(company_Code, user_Code, dcrDate, Key_Column);
                if (IlstKYDCustomers != null)
                {
                    List <KYDModel> lstKYDCustomers = IlstKYDCustomers.ToList();

                    return(lstKYDCustomers);
                }
                else
                {
                    return(null);
                }
            }
            catch
            {
                throw;
            }
        }
Example #17
0
 public PartialViewResult ChemistDetails()
 {
     ViewBag.CompanyCode = _objCurrentInfo.GetCompanyCode();
     ViewBag.UserCode    = _objCurrentInfo.GetUserCode();
     ViewBag.RegionCode  = _objCurrentInfo.GetRegionCode();
     return(PartialView());
 }
Example #18
0
        public ViewResult ReconApprovalList()
        {
            ViewBag.Compnay_Code = _objcurr.GetCompanyCode();
            ViewBag.UserCode     = _objcurr.GetUserCode();
            ViewBag.Compnay_Id   = _objcurr.GetCompanyId();

            return(View());
        }
Example #19
0
        public string GetChemistAccMandatory(string DCR_Date)
        {
            objBLDCRChemistVisit = new BL_DCRChemistVisit();
            _objCurrentInfo      = new CurrentInfo();
            string Company_Code = _objCurrentInfo.GetCompanyCode();
            string User_Code    = _objCurrentInfo.GetUserCode();

            return(objBLDCRChemistVisit.GetChemistAccMandatory(Company_Code, User_Code, DCR_Date));
        }
Example #20
0
        public int GetCountforDCRRestrictDate(string DCR_Date)
        {
            _objSPData      = new SPData();
            _objcurrentInfo = new CurrentInfo();
            string company_Code = _objcurrentInfo.GetCompanyCode();
            string user_Code    = _objcurrentInfo.GetUserCode();

            return(_objSPData.GetCountforDCRRestrictDate(company_Code, user_Code, DCR_Date));
        }
Example #21
0
        //
        // GET: /Order/

        public ActionResult OrderList()
        {
            BLUser objUser = new BLUser();
            List <MVCModels.HiDoctor_Master.UserModel> lstUser = new List <MVCModels.HiDoctor_Master.UserModel>();

            lstUser = objUser.GetChildUsersCodeAndNameOnly(_objCurrentInfo.GetCompanyCode(), _objCurrentInfo.GetUserCode());
            ViewBag.Child_User_Count = lstUser.Count();

            string strRegionCode = _objCurrentInfo.GetRegionCode();

            strRegionCode         += "^";
            ViewBag.LineOfBusiness = objBLOrder.GetCheckLineOfBusiness(strRegionCode);
            ViewBag.Region_Code    = _objCurrentInfo.GetRegionCode();
            ViewBag.Region_Name    = _objCurrentInfo.GetRegionName();
            ViewBag.Current_Month  = System.DateTime.Now.Month + "-" + System.DateTime.Now.Year;
            ViewBag.Previous_Month = System.DateTime.Now.AddMonths(-1).Month + "-" + System.DateTime.Now.AddMonths(-1).Year;
            ViewBag.Next_Month     = System.DateTime.Now.AddMonths(1).Month + "-" + System.DateTime.Now.AddMonths(1).Year;
            return(View());
        }
Example #22
0
        /// <summary>
        /// Bind the Profile Master in Grid
        /// </summary>
        /// <returns></returns>
        public JsonResult GetProfileDetails()
        {
            string companyCode = _objcurrentInfo.GetCompanyCode();
            string userCode    = _objcurrentInfo.GetUserCode();

            try
            {
                BLMaster _objBlMaster = new BLMaster();
                List <MVCModels.HiDoctor_Master.EmployeeModel> lstProfileDetails = new List <MVCModels.HiDoctor_Master.EmployeeModel>();
                lstProfileDetails = _objBlMaster.GetMyProfileDetails(companyCode, userCode).ToList();
                DataControl.JSONConverter objJson = new DataControl.JSONConverter();
                return(Json(objJson.Serialize(lstProfileDetails)));
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dicContext = new Dictionary <string, string>();
                DataControl.Impl.ExceptionHandler.WriteLog(ex, dicContext);
                return(null);
            }
        }
Example #23
0
        public JsonResult GetPrivileges()
        {
            try
            {
                DataControl.CurrentInfo objCurr = new DataControl.CurrentInfo();
                string companyCode  = objCurr.GetCompanyCode();
                string userTypeCode = objCurr.GetUserTypeCode();
                string userCode     = objCurr.GetUserCode();

                DataSet ds = new DataSet();

                string     cmdText = "SP_hdGetPrivilegeMapping";
                SqlCommand cmd     = new SqlCommand(cmdText);
                cmd.CommandType = CommandType.StoredProcedure;

                // Added the parameter to SqlCommand.
                AddParamToSqlCommand(cmd, "@companyCode", ParameterDirection.Input, SqlDbType.VarChar, 30, companyCode);
                AddParamToSqlCommand(cmd, "@userTypeCode", ParameterDirection.Input, SqlDbType.VarChar, 30, userTypeCode);
                AddParamToSqlCommand(cmd, "@userCode", ParameterDirection.Input, SqlDbType.VarChar, 30, userCode);
                AddParamToSqlCommand(cmd, "@Result", ParameterDirection.Output, SqlDbType.VarChar, 30, "");

                try
                {
                    objData.OpenConnection(companyCode);
                    ds = objData.ExecuteDataSet(cmd);
                }
                finally
                {
                    objData.CloseConnection();
                }


                List <Models.MasterModel> lst = new List <Models.MasterModel>();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DataTable dt = new DataTable();
                    dt = ds.Tables[0];

                    lst = (from item in dt.AsEnumerable()
                           select new Models.MasterModel()
                    {
                        PrivilegeName = item["Privilege_Name"].ToString(),
                        PrivilegeValue = item["Privilege_Value_Name"].ToString(),
                        UsertypeCode = item["User_Type_Code"].ToString()
                    }).ToList <Models.MasterModel>();
                }

                return(Json(lst, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }