コード例 #1
0
        public ActionResult Valuables(int?cid, FPValuables FPValuables)
        {
            NewPolicyDetailsClass commonModel = new NewPolicyDetailsClass();
            List <SelectListItem> DescriptionSpeciItemsList = new List <SelectListItem>();

            DescriptionSpeciItemsList = commonModel.descriptionListFC();
            FPValuables.SpecifiedItemDescriptionObj.SpecItemDescriptionList = DescriptionSpeciItemsList;
            if (cid != null)
            {
                ViewBag.cid            = cid;
                FPValuables.CustomerId = cid.Value;
            }
            else
            {
                ViewBag.cid = FPValuables.CustomerId;
            }
            List <SelectListItem> ValuablesexcessToPay = new List <SelectListItem>();

            ValuablesexcessToPay = commonModel.excessRate();
            FPValuables.ExcessValuablesObj.ExcessList = ValuablesexcessToPay;
            string policyid = null;
            var    db       = new MasterDataEntities();

            Session["unId"]      = null;
            Session["profileId"] = null;
            return(RedirectToAction("VehicleDescription", "FarmMotors", new { cid = FPValuables.CustomerId, PcId = FPValuables.PcId }));
        }
コード例 #2
0
        public ActionResult FarmDetails(int?cid, FarmDetails FarmDetails)
        {
            NewPolicyDetailsClass FarmDetailsmodel     = new NewPolicyDetailsClass();
            List <SelectListItem> constructionTypeList = new List <SelectListItem>();

            constructionTypeList = FarmDetailsmodel.constructionType();
            FarmDetails.ConstructionFBObj.ConstructionHCList = constructionTypeList;
            var db = new MasterDataEntities();

            if (cid != null)
            {
                ViewBag.cid            = cid;
                FarmDetails.CustomerId = cid.Value;
            }
            else
            {
                ViewBag.cid = FarmDetails.CustomerId;
            }
            string policyid = null;

            Session["unId"]      = null;
            Session["profileId"] = null;
            Session["FarmFxd"]   = 1;

            return(RedirectToAction("FarmContents", "MobileFarm", new { cid = FarmDetails.CustomerId, PcId = FarmDetails.PcId }));

            return(View(FarmDetails));
        }
コード例 #3
0
        public void runStates()
        {
            GenericClass obj = new GenericClass();

            var nextpageurl = "http://www.mapsofindia.com/villages/data.php?state=all";
            var webpage     = obj.GetWebPage(nextpageurl);


            IList <MasterDataJson> persons = new JavaScriptSerializer().Deserialize <IList <MasterDataJson> >(webpage);

            for (int i = 0; i < persons.Count; i++)
            {
                using (var context = new MasterDataEntities())
                {
                    var t = new tbl_state
                    {
                        stateId   = Convert.ToInt16(persons[i].value),
                        stateName = persons[i + 1].text
                    };
                    context.tbl_state.Add(t);
                    context.SaveChanges();
                }

                i = i + 1;
            }
        }
コード例 #4
0
        /// <summary>
        /// Get Customer Details by passing Id
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>

        public int?InsertUpdateInsuredDetails(int?ID, InsuredDetails insureddetailsmodel)
        {
            int?result = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                if (ID.HasValue && ID > 0)
                {//UPDATE the Insured Details
                 //  result = db.IT_CC_Insert_InsuredDetails(ID, insureddetailsmodel.ClientType, insureddetailsmodel.Title, insureddetailsmodel.FirstName, insureddetailsmodel.LastName, insureddetailsmodel.MiddleName, insureddetailsmodel.CompanyBusinessName, insureddetailsmodel.TradingName, insureddetailsmodel.ABN, insureddetailsmodel.AddressID, insureddetailsmodel.PostalAddressID, insureddetailsmodel.PhoneNo, insureddetailsmodel.MobileNo, insureddetailsmodel.DOB, insureddetailsmodel.EmailID).SingleOrDefault();
                }
                else
                {
                    //INSERT the Insured details
                    // result = db.IT_CC_Insert_InsuredDetails(null, insureddetailsmodel.ClientType, insureddetailsmodel.Title, insureddetailsmodel.FirstName, insureddetailsmodel.LastName, insureddetailsmodel.MiddleName, insureddetailsmodel.CompanyBusinessName, insureddetailsmodel.TradingName, insureddetailsmodel.ABN, insureddetailsmodel.AddressID, insureddetailsmodel.PostalAddressID, insureddetailsmodel.PhoneNo, insureddetailsmodel.MobileNo, insureddetailsmodel.DOB, insureddetailsmodel.EmailID).SingleOrDefault();
                }
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(result);
        }
コード例 #5
0
        public ActionResult FarmContents(MobileFarmContents MobileFarmContents, int?cid)
        {
            NewPolicyDetailsClass commonModel = new NewPolicyDetailsClass();

            List <SelectListItem> excessToPay = new List <SelectListItem>();

            excessToPay = commonModel.excessRate();
            MobileFarmContents.ExcessFarmContentFPObj.ExcessList = excessToPay;

            var db = new MasterDataEntities();

            if (cid != null)
            {
                ViewBag.cid = cid;
                MobileFarmContents.CustomerId = cid.Value;
            }
            else
            {
                ViewBag.cid = MobileFarmContents.CustomerId;
            }
            string policyid = null;

            Session["unId"]       = null;
            Session["profileId"]  = null;
            Session["farmmobile"] = 1;
            return(RedirectToAction("Burglary", "FarmPolicyBurglary", new { cid = MobileFarmContents.CustomerId, PcId = MobileFarmContents.PcId }));

            return(View(MobileFarmContents));
        }
コード例 #6
0
 public ActionResult ResetPassword(string guid)
 {
     try
     {
         MasterDataEntities db = new MasterDataEntities();
         int?result            = db.IT_GetForgetPasswordStatus(guid).FirstOrDefault();
         if (result == 0)
         {
             ViewBag.ErrorMessage = "Already used, URL is not valid.";
         }
         else if (result == 1)
         {
         }
         else
         {
             ViewBag.ErrorMessage = "Already used, URL is not valid.";
         }
         string Email = string.Empty;
         if (Session["Email"] == null || Session["Email"] != "")
         {
             Email            = Session["Email"].ToString();
             Session["Email"] = Email;
         }
     }
     catch (Exception ex)
     {
     }
     return(View());
 }
        public ActionResult FarmInterruption(int?cid, FPFarmInterruption FPFarmInterruption)
        {
            NewPolicyDetailsClass commonModel = new NewPolicyDetailsClass();
            List <SelectListItem> ExcessToPay = new List <SelectListItem>();

            ExcessToPay = commonModel.excessRate();

            FPFarmInterruption.ExcessFarmIncomeFPObj.ExcessList    = ExcessToPay;
            FPFarmInterruption.ExcessAgistIncomeFPObj.ExcessList   = ExcessToPay;
            FPFarmInterruption.ExcessExtraCostFPObj.ExcessList     = ExcessToPay;
            FPFarmInterruption.ExcessShearingDelayFPObj.ExcessList = ExcessToPay;
            if (cid != null)
            {
                ViewBag.cid = cid;
                FPFarmInterruption.CustomerId = cid.Value;
            }
            else
            {
                ViewBag.cid = FPFarmInterruption.CustomerId;
            }
            var db = new MasterDataEntities();

            Session["unId"]      = null;
            Session["profileId"] = null;
            return(RedirectToAction("Money", "FarmPolicyMoney", new { cid = FPFarmInterruption.CustomerId, PcId = FPFarmInterruption.PcId }));
        }
コード例 #8
0
        public ActionResult TravelCover(TravelCover TravelCover, int?cid)
        {
            NewPolicyDetailsClass Tmodel    = new NewPolicyDetailsClass();
            List <SelectListItem> ExcTcList = new List <SelectListItem>();

            ExcTcList = Tmodel.excessRate();
            TravelCover.ExcessObj.ExcessList = ExcTcList;
            var    db       = new MasterDataEntities();
            string policyid = null;

            if (cid.HasValue && cid > 0)
            {
            }
            Session["unId"]      = null;
            Session["profileId"] = null;
            string actionname     = null;
            string controllername = null;

            if (Session["Actname"] != null)
            {
                actionname = Session["Actname"].ToString();
            }
            if (Session["controller"] != null)
            {
                controllername = Session["controller"].ToString();
            }
            //if (actionname != null && controllername != null)
            //{
            //    return RedirectToAction(actionname, controllername, new { cid = TravelCover.CustomerId, PcId = TravelCover.PcId });
            //}
            return(RedirectToAction("DisclosureDetails", "Disclosure", new { cid = TravelCover.CustomerId, PcId = TravelCover.PcId }));
            //return View(TravelCover);
        }
コード例 #9
0
        public ActionResult LiabilityCover(LiabilityCover LiabilityCover, int?cid)
        {
            List <SelectListItem> ExcList = new List <SelectListItem>();

            ExcList.Add(new SelectListItem {
                Text = "$250", Value = "1"
            });
            LiabilityCover.ExcessLCObj.ExcessList = ExcList;
            var    db       = new MasterDataEntities();
            string policyid = null;

            Session["profileId"] = null;
            Session["UnId"]      = null;
            string actionname     = null;
            string controllername = null;

            if (Session["Actname"] != null)
            {
                actionname = Session["Actname"].ToString();
            }
            if (Session["controller"] != null)
            {
                controllername = Session["controller"].ToString();
            }
            //if (actionname != null && controllername != null)
            //{
            //    return RedirectToAction(actionname, controllername, new { cid = LiabilityCover.CustomerId, PcId = LiabilityCover.PcId });
            //}
            return(RedirectToAction("VehicleDescription", "MotorCover", new { cid = LiabilityCover.CustomerId, PcId = LiabilityCover.PcId }));
        }
コード例 #10
0
        public ActionResult Index()
        {
            MasterDataEntities db = new MasterDataEntities();

            ViewBag.Title = "Home Page";

            return(RedirectToAction("AgentLogin", "Login"));
        }
コード例 #11
0
        /// <summary>
        /// Get Customer Details by passing Id
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public GetInsuredDetailsRef GetInsuredDetails(string emailid, string name, string phoneno)
        {
            GetInsuredDetailsRef insuredref          = new GetInsuredDetailsRef();
            InsuredDetails       insureddetailsmodel = new InsuredDetails();
            MasterDataEntities   db = new MasterDataEntities();

            insuredref.ErrorMessage = new List <string>();
            try
            {
                if (emailid == "")
                {
                    emailid = null;
                }
                if (name == "")
                {
                    name = null;
                }
                if (phoneno == "")
                {
                    phoneno = null;
                }
                var Insured = db.IT_CC_GET_InsuredDetails(emailid, name, phoneno).FirstOrDefault();
                if (Insured != null)
                {
                    insureddetailsmodel.ClientType          = Convert.ToInt16(Insured.ClientType);
                    insureddetailsmodel.InsuredID           = Insured.InsuredID;
                    insureddetailsmodel.Title               = Insured.Title;
                    insureddetailsmodel.FirstName           = Insured.FirstName;
                    insureddetailsmodel.LastName            = Insured.LastName;
                    insureddetailsmodel.MiddleName          = Insured.MiddleName;
                    insureddetailsmodel.CompanyBusinessName = Insured.CompanyBusinessName;
                    insureddetailsmodel.TradingName         = Insured.TradingName;
                    insureddetailsmodel.ABN             = Insured.ABN;
                    insureddetailsmodel.AddressID       = Convert.ToInt16(Insured.AddressID);
                    insureddetailsmodel.PostalAddressID = Insured.PostalAddressID.ToString();
                    insureddetailsmodel.PhoneNo         = Insured.PhoneNo;
                    insureddetailsmodel.MobileNo        = Insured.MobileNo;
                    insureddetailsmodel.DOB             = Convert.ToDateTime(Insured.DOB);
                    insureddetailsmodel.EmailID         = Insured.EmailID;
                    insuredref.Insureds.Add(insureddetailsmodel);
                    insuredref.Status = "Success";
                }
                else
                {
                    insuredref.ErrorMessage.Add("No Data Available");
                    insuredref.Status = "Failure";
                }
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(insuredref);
        }
コード例 #12
0
ファイル: Application.cs プロジェクト: bencomtech/EF6MySQL
        public void Run()
        {
            using (MasterDataEntities db = new MasterDataEntities())
            {
                List <province> provinces = db.provinces
                                            .Where(it => it.REGION_ID == "02")
                                            .ToList();

                Console.WriteLine("Total: {0}", provinces.Count);
            }
        }
コード例 #13
0
        public ActionResult Money(int?cid, FPMoney FPMoney)
        {
            NewPolicyDetailsClass commonModel      = new NewPolicyDetailsClass();
            List <SelectListItem> MoneyExcessToPay = new List <SelectListItem>();

            MoneyExcessToPay = commonModel.excessRate();
            FPMoney.ExcessFPMoneyObj.ExcessList = MoneyExcessToPay;
            var db = new MasterDataEntities();

            Session["unId"]      = null;
            Session["profileId"] = null;
            return(RedirectToAction("FarmLiability", "FarmPolicyFarmLiability", new { cid = FPMoney.CustomerId, PcId = FPMoney.PcId }));
        }
コード例 #14
0
        // GET api/values
        public IEnumerable <string> Get()
        {
            MasterDataEntities db = new MasterDataEntities();

            ////var list = db.GetCustomerDetails(null).ToList();
            ////List<string> names = new List<string>();
            ////if(list!=null && list.Any())
            ////{
            ////    names = list.Select(l => l.CustomerName).ToList();
            ////    return names;
            ////}
            return(new string[] { "value1", "value2" });
        }
コード例 #15
0
        public ActionResult Transit(int?cid, FPTransit FPTransit)
        {
            NewPolicyDetailsClass commonModel        = new NewPolicyDetailsClass();
            List <SelectListItem> TransitExcessToPay = new List <SelectListItem>();

            TransitExcessToPay = commonModel.excessRate();
            FPTransit.ExcessFPTransitObj.ExcessList = TransitExcessToPay;
            var    db       = new MasterDataEntities();
            string policyid = null;

            Session["unId"]      = null;
            Session["profileId"] = null;
            return(RedirectToAction("Livestock", "FarmPolicyLivestock", new { cid = FPTransit.CustomerId, PcId = FPTransit.PcId }));
        }
コード例 #16
0
        public ActionResult FarmLocationDetails(int?cid, int?PcId)
        {
            List <SessionModel> PolicyInclustions = new List <SessionModel>();

            FarmLocationDetails FarmLocationDetails = new FarmLocationDetails();

            ViewBag.cid = cid;
            if (cid != null)
            {
                FarmLocationDetails.CustomerId = cid.Value;
            }
            var    db       = new MasterDataEntities();
            string policyid = null;

            return(View(FarmLocationDetails));
        }
コード例 #17
0
        public PolicyInsuredIDRef GetPolicyInsuredDetails(int ID)
        {
            PolicyInsuredIDRef policyInsuredRef = new PolicyInsuredIDRef();

            try
            {
                policyInsuredRef.PolicyInsureIDData = new List <PolicyInsuredID>();
                PolicyInsuredID    policyInsuredIDModel = new PolicyInsuredID();
                MasterDataEntities db = new MasterDataEntities();
                var str = db.IT_CC_GET_PolicyInsured(ID).ToList();
                policyInsuredRef.ErrorMessage = new List <string>();
                if (str.Count > 0)
                {
                    foreach (var item in str)
                    {
                        policyInsuredIDModel               = new PolicyInsuredID();
                        policyInsuredIDModel.PcId          = item.PcId;
                        policyInsuredIDModel.TrId          = item.TrId;
                        policyInsuredIDModel.FirstName     = item.FirstName;
                        policyInsuredIDModel.LastName      = item.LastName;
                        policyInsuredIDModel.MiddleName    = item.MiddleName;
                        policyInsuredIDModel.PhoneNumber   = item.PhoneNo;
                        policyInsuredIDModel.MobileNumber  = item.MobileNo;
                        policyInsuredIDModel.EmailID       = item.EmailID;
                        policyInsuredIDModel.DOB           = item.DOB;
                        policyInsuredIDModel.PolicyInsurID = item.InsuredID;

                        policyInsuredRef.PolicyInsureIDData.Add(policyInsuredIDModel);
                        policyInsuredRef.Status = "Success";
                    }
                }
                else
                {
                    policyInsuredRef.ErrorMessage.Add("No Data Available");
                    policyInsuredRef.Status = "Failure";
                }
            }
            catch (Exception xp)
            {
                policyInsuredRef.ErrorMessage.Add(xp.Message);
                policyInsuredRef.Status = "Failure";
            }
            finally
            {
            }
            return(policyInsuredRef);
        }
コード例 #18
0
        public ActionResult MainDetails(int?cid, HB2HomeDescription HB2HomeDescription)
        {
            var db = new MasterDataEntities();

            if (cid != null)
            {
                ViewBag.cid = cid;
                HB2HomeDescription.CustomerId = cid.Value;
            }
            else
            {
                ViewBag.cid = HB2HomeDescription.CustomerId;
            }
            Session["unId"]      = null;
            Session["profileId"] = null;
            return(RedirectToAction("HomeContents", "FarmPolicyHomeContent", new { cid = HB2HomeDescription.CustomerId, PcId = HB2HomeDescription.PcId }));
        }
コード例 #19
0
        public int InsertPolicyLogDetails(PolicyLogDetails policylogmodel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_Insert_PolicyLogDetails(policylogmodel.PolicyNumber, policylogmodel.PolicyLogID, policylogmodel.Details, policylogmodel.UserID, policylogmodel.Timestamp);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #20
0
        public int UpdatePolicyLogDetails(int ID, PolicyLogDetails policylogmodel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_UPDATE_PolicyLogDetails(ID, policylogmodel.PolicyLogID, policylogmodel.Details, policylogmodel.Timestamp);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #21
0
        public int InsertValuablesItemDetails(ValuableItemDetails valuableItemModel)
        {
            int details = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                details = db.IT_CC_Insert_ValuablesItems(valuableItemModel.PcId, valuableItemModel.TrId, valuableItemModel.HomeID, valuableItemModel.ValuablesItemID, valuableItemModel.ValuablesDescription, valuableItemModel.ValuablesSumInsured);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(details);
        }
コード例 #22
0
        public int UpdatePolicyInsuredDetails(int ID, PolicyInsuredID policyInsuredIDModel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_UPDATE_PolicyInsured(ID, policyInsuredIDModel.PcId, policyInsuredIDModel.TrId);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #23
0
        public int InsertValuablesDetails(ValuableDetails valuableDetailsModel)
        {
            int details = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                details = db.IT_CC_Insert_ValuablesDetails(valuableDetailsModel.PcId, valuableDetailsModel.TrId, valuableDetailsModel.HomeID, valuableDetailsModel.ValuablesUnspecifiedSumInsured, valuableDetailsModel.ValuablesExcess, valuableDetailsModel.PremiumId);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(details);
        }
コード例 #24
0
        public int UpdateValuablesDetails(int ID, ValuableDetails valuableDetailsModel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_UPDATE_ValuablesDetails(ID, valuableDetailsModel.ValuablesUnspecifiedSumInsured, valuableDetailsModel.ValuablesExcess);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #25
0
        public int UpdateValuablesItemDetails(int ID, ValuableItemDetails valuableItemModel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_UPDATE_ValuablesItemDetails(ID, valuableItemModel.ValuablesDescription);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #26
0
        public int InsertInsuredDisclosureDetails(InsuredDisclosure insureDisclosureModel)
        {
            int details = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                details = db.IT_CC_Insert_InsuredDisclosureDetails(insureDisclosureModel.PcId, insureDisclosureModel.TrId, insureDisclosureModel.PreviousInsurer, insureDisclosureModel.RDBValue1, insureDisclosureModel.RDBValue2, insureDisclosureModel.RDBValue3, insureDisclosureModel.RDBValue4, insureDisclosureModel.RDBValue5, insureDisclosureModel.RDBValue6, insureDisclosureModel.RDBValue7, insureDisclosureModel.DischargeDate, insureDisclosureModel.Description);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(details);
        }
コード例 #27
0
        public int UpdateInsuredDisclosureDetails(int ID, InsuredDisclosure insureDisclosureModel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_Update_InsuredDisclosureDetails(insureDisclosureModel.PreviousInsurer, insureDisclosureModel.DischargeDate, insureDisclosureModel.Description, ID);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #28
0
        public InsureDisclosureRef GetInsuredDisclosureDetails(int Id)
        {
            InsureDisclosureRef insuredisclosureRef = new InsureDisclosureRef();

            try
            {
                InsuredDisclosure  insureDisclosureModel = new InsuredDisclosure();
                MasterDataEntities db = new MasterDataEntities();
                var str = db.IT_CC_GET_InsuredDisclosureDetails(Id).ToList();
                if (str.Count > 0)
                {
                    foreach (var item in str)
                    {
                        insureDisclosureModel = new InsuredDisclosure();
                        insureDisclosureModel.PreviousInsurer     = item.PreviousInsurer;
                        insureDisclosureModel.RDBValue1           = item.RDBValue1;
                        insureDisclosureModel.RDBValue2           = item.RDBValue2;
                        insureDisclosureModel.RDBValue3           = item.RDBValue3;
                        insureDisclosureModel.RDBValue4           = item.RDBValue4;
                        insureDisclosureModel.RDBValue5           = item.RDBValue5;
                        insureDisclosureModel.RDBValue6           = item.RDBValue6;
                        insureDisclosureModel.RDBValue7           = item.RDBValue7;
                        insureDisclosureModel.DischargeDate       = item.DischargeDate;
                        insureDisclosureModel.Description         = item.Description;
                        insureDisclosureModel.PcId                = item.PcId;
                        insureDisclosureModel.TrId                = item.TrId;
                        insuredisclosureRef.InsuredDisclosureData = insureDisclosureModel;
                        insuredisclosureRef.Status                = "Success";
                    }
                }
                else
                {
                    insuredisclosureRef.ErrorMessage.Add("No Data Available");
                    insuredisclosureRef.Status = "Failure";
                }
            }
            catch (Exception xp)
            {
                insuredisclosureRef.ErrorMessage.Add(xp.Message);
                insuredisclosureRef.Status = "Failure";
            }
            finally
            {
            }
            return(insuredisclosureRef);
        }
コード例 #29
0
        public int InsertPolicyInsuredDetails(PolicyInsuredID policyInsuredIDModel)
        {
            int icount = 0;

            try
            {
                MasterDataEntities db = new MasterDataEntities();
                icount = db.IT_CC_InsertPolicyInsured(policyInsuredIDModel.PcId, policyInsuredIDModel.TrId, policyInsuredIDModel.PolicyInsurID);
            }
            catch (Exception xp)
            {
            }
            finally
            {
            }
            return(icount);
        }
コード例 #30
0
        public ActionResult FarmLocationDetails(int?cid, FarmLocationDetails FarmLocationDetails)
        {
            var db = new MasterDataEntities();

            if (cid != null)
            {
                ViewBag.cid = cid;
                FarmLocationDetails.CustomerId = cid.Value;
            }
            else
            {
                ViewBag.cid = FarmLocationDetails.CustomerId;
            }
            if (cid.HasValue && cid > 0)
            {
                //if (Session["completionTrackPFP"] != null)
                //{
                //    Session["completionTrackPFP"] = Session["completionTrackPFP"];
                //    FarmLocationDetails.completionTrackPFP = Session["completionTrackPFP"].ToString();
                //    if (FarmLocationDetails.completionTrackPFP != null)
                //    {
                //        string Completionstring = string.Empty;
                //        char[] arr = FarmLocationDetails.completionTrackPFP.ToCharArray();
                //        for (int i = 0; i < arr.Length; i++)
                //        {
                //            char a = arr[i];
                //            if (i == 0)
                //            {
                //                a = '1';
                //            }
                //            Completionstring = Completionstring + a;
                //        }
                //        Session["completionTrackPFP"] = Completionstring;
                //        FarmLocationDetails.completionTrackPFP = Completionstring;
                //    }
                //}
                //else
                //{
                //    Session["completionTrackPFP"] = "1-0-0-0-0"; ;
                //    FarmLocationDetails.completionTrackPFP = Session["completionTrackPFP"].ToString();
                //}
                return(RedirectToAction("FarmDetails", new { cid = cid }));
            }
            return(View(FarmLocationDetails));
        }