예제 #1
0
        public ActionResult LockReleaseDetails(string Lid)
        {
            if (Lid == null)
            {
                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.Company_Code    = _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.DoctorMissedReason.ParameterMode dd = Newtonsoft.Json.JsonConvert.DeserializeObject <MVCModels.DoctorMissedReason.ParameterMode>(parameters);


                ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
                ViewBag.Company_Code    = _objCurrentInfo.GetCompanyCode();
                ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
                ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
                ViewBag.CompanyId       = _objCurrentInfo.GetCompanyId();
                ViewBag.IsResponsive    = "NO";
            }
            return(View());
        }
예제 #2
0
        public bool CheckSfcMasterExist()
        {
            try
            {
                bool flag = false;
                DataControl.CurrentInfo objCurr = new DataControl.CurrentInfo();
                DataControl.Data        objData = new DataControl.Data();
                string companyCode = objCurr.GetCompanyCode();
                string regionCode  = objCurr.GetRegionCode();
                int    result      = 0;

                objData.OpenConnection(companyCode);
                {
                    result = Convert.ToInt32(objData.ExecuteScalar("exec SP_hdCheckSfcMasterExist '" + companyCode + "','" + regionCode + "'"));
                }
                objData.CloseConnection();

                if (result > 0)
                {
                    flag = true;
                }
                return(flag);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #3
0
 public ActionResult BirthdayMail()
 {
     ViewBag.CompanyCode     = _objCurrentInfo.GetCompanyCode();
     ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
     ViewBag.CompanyId       = _objCurrentInfo.GetCompanyId();
     return(View());
 }
예제 #4
0
        /// <summary>
        /// this function gets the list of users and their related data
        /// for whom the compliance report
        /// was generated for the selected date
        /// </summary>
        /// <param name="selected_date"></param>
        /// <returns>Compliance List for the selected date</returns>
        //public List<SMSReportModel> GetSMSComplianceReport(string selected_date, string user_Type_Name)
        public List <SMSReportModel> GetSMSComplianceReport(string selected_date)
        {
            string Company_Code = string.Empty;
            string Region_Code  = string.Empty;

            Company_Code = _objCurrentInfo.GetCompanyCode();
            Region_Code  = _objCurrentInfo.GetRegionCode();
            try
            {
                //return _objDALSMS.GetSMSComplianceReport(Company_Code, Region_Code, selected_date, user_Type_Name);
                return(_objDALSMS.GetSMSComplianceReport(Company_Code, Region_Code, selected_date));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #5
0
        public JsonResult GetGroupmembers(int Group_Id)
        {
            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            string           RegionCode        = objCurInfo.GetRegionCode();
            UserGroupHistory lstGrpMembs       = new UserGroupHistory();

            lstGrpMembs = _ObjNoticeBoard.GetGroupmembers(Group_Id, RegionCode);
            return(Json(lstGrpMembs, JsonRequestBehavior.AllowGet));
        }
예제 #6
0
 public ActionResult CPDLeave(string CPD_Date, int CPD_Id)
 {
     ViewBag.subDomainName   = _objCurrentInfo.GetSubDomain();
     ViewBag.CompanyId       = _objCurrentInfo.GetCompanyId();
     ViewBag.LoginRegionCode = _objCurrentInfo.GetRegionCode();
     ViewBag.LoginUserCode   = _objCurrentInfo.GetUserCode();
     ViewBag.CPD_Date        = CPD_Date;
     ViewBag.CPD_Id          = CPD_Id;
     return(View());
 }
예제 #7
0
        public JsonResult GetGroupNames()
        {
            List <MVCModels.UserGroup> lstGroups = new List <MVCModels.UserGroup>();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            string RegionCode = objCurInfo.GetRegionCode();

            lstGroups = _ObjNoticeBoard.GetGroupNames(RegionCode);
            return(Json(lstGroups, JsonRequestBehavior.AllowGet));
        }
예제 #8
0
        public int InsertNewGroup(string UserCodes, string GroupName)
        {
            int result = 0;

            BL_NoticeBoard ObjNewGroup = new BL_NoticeBoard();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            string UserName   = objCurInfo.GetUserName();
            string RegionCode = objCurInfo.GetRegionCode();

            result = ObjNewGroup.InsertNewGroup(UserCodes, GroupName, UserName, RegionCode);
            return(result);
        }
예제 #9
0
        public JsonResult GetDoctors(string accRegions, string accChemist, string dcrActualDate)
        {
            List <JsonResult> lstJSON     = new List <JsonResult>();
            string            companyCode = _objcurrentInfo.GetCompanyCode();
            string            regionCode  = _objcurrentInfo.GetRegionCode();
            string            regionCodes = accRegions.Trim().Length > 0 ? accRegions + regionCode + "^" : regionCode + "^";
            string            regions     = string.Empty;
            string            userCode    = _objcurrentInfo.GetUserCode();
            int regionLength = 31;

            if (!accChemist.Trim().ToUpper().Contains("DOCTOR"))
            {
                regions = regionCode + "^";
            }
            else
            {
                regions      = regionCodes;
                regionLength = regionCodes.Length;
            }

            DataSet dsDoctors = new DataSet();

            IConfigSettings config_Settings = new Config_Settings();
            string          DoctorSufPreColumnConfigValue = config_Settings.GetConfigDefaultValue(companyCode, DataControl.EnumType.CONFIG_TYPE.DCR, DataControl.EnumType.CONFIG_KEY.DCR_DOCTOR_SUFIX_COLUMNS);

            // Execute the Query and returns the DataSet.
            dsDoctors = _objSPData.GetSelectedDoctors(companyCode, regions, regionCode, DoctorSufPreColumnConfigValue, dcrActualDate);
            DataTable dtDoctors = dsDoctors.Tables[0];

            // Convert the DataTable to list.
            List <DCRDoctorVisitModel> lstDoctor = (from Doctor in dtDoctors.AsEnumerable()
                                                    select new DCRDoctorVisitModel
            {
                label = Doctor["Customer_Name"].ToString() + "_" + Doctor["MDL"].ToString() + "_" + Doctor["Speciality_Name"].ToString() + "_" + Doctor["Region_Name"].ToString(),
                value = Doctor["Customer_Code"].ToString(),
                Category = Doctor["Category_Name"].ToString(),
                Category_Code = Doctor["Category_Code"].ToString(),
                Is_Acc_Doctor = Doctor["Is_Acc_Doctor"].ToString(),
                Speciality_Code = Doctor["Speciality_Code"].ToString(),
                Speciality_Name = Doctor["Speciality_Name"].ToString(),
                Doctor_Region_Code = Doctor["Region_Code"].ToString(),
                Doctor_Code = Doctor["Customer_Code"].ToString()
            }).ToList <DCRDoctorVisitModel>();

            // returns the list.
            lstJSON.Add(Json(lstDoctor, JsonRequestBehavior.AllowGet));

            DataSet dsSpeciality = new DataSet();

            // Execute the Query and returns the DataSet.
            dsSpeciality = _objSPData.GetSpeciality(companyCode, userCode);
            DataTable dtSpeciality = dsSpeciality.Tables[0];

            // Convert the DataTable to list.
            List <DCRDoctorVisitModel> lstSpeciality = (from Speciality in dtSpeciality.AsEnumerable()
                                                        select new DCRDoctorVisitModel
            {
                label = Speciality["Speciality_Name"].ToString(),
                value = Speciality["Speciality_Code"].ToString()
            }).ToList <DCRDoctorVisitModel>();

            // returns the list.
            lstJSON.Add(Json(lstSpeciality, JsonRequestBehavior.AllowGet));
            return(Json(lstJSON));
        }
예제 #10
0
 public ActionResult Index(string id)
 {
     ViewBag.RegionCode = _objcurrentInfo.GetRegionCode();
     ViewBag.Entity     = id;
     return(View());
 }
예제 #11
0
        public double CalculateSFCFare(Models.FareCalculationDTO fareCalcPassed)
        {
            try
            {
                double totalFare = 0.0;
                string hopNeed   = fareCalcPassed.IntermediatePlace;
                string entity    = fareCalcPassed.Entity;
                string dcrCode   = fareCalcPassed.DcrCode;
                string dcrDate   = fareCalcPassed.DcrDate;
                string dcrFlag   = fareCalcPassed.DcrFalg;

                Controllers.MasterController objMaster = new Controllers.MasterController();
                DataControl.CurrentInfo      objCurr   = new DataControl.CurrentInfo();
                DataControl.Data             objData   = new DataControl.Data();

                string companyCode = objCurr.GetCompanyCode();
                string userCode    = objCurr.GetUserCode();
                string regionCode  = objCurr.GetRegionCode();

                if (entity == "HQ")
                {
                    DataSet dsHop = new DataSet();

                    objData.OpenConnection(companyCode);
                    {
                        dsHop = objData.ExecuteDataSet("exec SP_hdGetHopPlaces '" + companyCode + "','" + dcrCode + "','" + userCode + "','" + dcrDate + "','" + dcrFlag + "'");
                    }
                    objData.CloseConnection();

                    if (dsHop.Tables[0].Rows.Count > 0)
                    {
                        try
                        {
                            objData.OpenConnection(companyCode);
                            {
                                totalFare = Convert.ToDouble(objData.ExecuteScalar("exec SP_hdGetSFCAmount '" + companyCode + "','" + dsHop.Tables[0].Rows[0]["SFC_Region_Code"].ToString().Trim() + "','" + dsHop.Tables[0].Rows[0]["From_Place"].ToString().Trim() + "','" + dsHop.Tables[0].Rows[0]["To_Place"].ToString().Trim() + "','" + dsHop.Tables[0].Rows[0]["SFC_Category_Name"].ToString().Trim() + "','" + dsHop.Tables[0].Rows[0]["Travel_Mode"].ToString().Trim() + "','" + dcrDate + "','" + userCode + "','" + regionCode + "','" + entity + "'"));
                            }
                            objData.CloseConnection();
                        }
                        catch
                        {
                            totalFare = 0.0;
                        }
                    }
                }
                else
                {
                    DataSet dsTravelPlace  = new DataSet();
                    double  fareAmount     = 0.0;
                    double  travelDistance = 0.0;

                    dsTravelPlace = objMaster.GetTrvelPlace(companyCode, dcrCode, dcrFlag, userCode, dcrDate);

                    if (dsTravelPlace.Tables[0].Rows.Count > 0)
                    {
                        foreach (DataRow dr in dsTravelPlace.Tables[0].Rows)
                        {
                            travelDistance = Convert.ToDouble(dr["Distance"].ToString().Trim());
                            try
                            {
                                objData.OpenConnection(companyCode);
                                {
                                    fareAmount = Convert.ToDouble(objData.ExecuteScalar("exec SP_hdGetSFCAmount '" + companyCode + "','" + dr["SFC_Region_Code"].ToString().Trim() + "','" + dr["From_Place"].ToString().Trim() + "','" + dr["To_Place"].ToString().Trim() + "','" + dr["SFC_Category_Name"].ToString().Trim() + "','" + dr["Travel_Mode"].ToString().Trim() + "','" + dcrDate + "','" + userCode + "','" + regionCode + "','" + entity + "'"));
                                }
                                objData.CloseConnection();
                            }
                            catch
                            {
                                fareAmount = 0.0;
                            }
                            totalFare += fareAmount;
                        }
                    }
                }
                return(totalFare);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }