示例#1
0
        public ActionResult Edit(decimal Id = 0)
        {
            ViewBag.tit = "Edit";
            ViewBag.Id  = Id;
            SWI.AirView.Common.SelectedList sl = new SWI.AirView.Common.SelectedList();
            var Clienttypes = sl.Definations("byDefinationType", "Profile Type");

            ViewBag.SelectedClientTypes = Clienttypes;
            ViewBag.SelectedPClient     = sl.Clients("AllVendors");
            AD_Clients Client = BL.Single1("ById", Id.ToString());

            if (Client == null)
            {
                TempData["msg_error"] = "Record Not Exist or You Are Not Authorize to access !";
                return(RedirectToAction("All"));
            }
            foreach (var item in Clienttypes)
            {
                if (item.Text == "Company" && (item.Value == Client.ClientTypeId.ToString()))
                {
                    return(RedirectToAction("All"));
                }
            }
            return(View("Edit", Client));
        }
示例#2
0
 // GET: Client
 public ActionResult NewSingle(string title)
 {
     ViewBag.tit = title;
     SWI.AirView.Common.SelectedList sl = new SWI.AirView.Common.SelectedList();
     ViewBag.SelectedClientTypes = sl.Definations("byDefinationType", "Profile Type");
     ViewBag.SelectedPClient     = sl.Clients("AllVendors");
     return(View());
 }
示例#3
0
        public ActionResult New()
        {
            ClientsBL ub   = new ClientsBL();
            var       List = ub.ToList("Company");

            SWI.AirView.Common.SelectedList sl = new SWI.AirView.Common.SelectedList();
            ViewBag.SelectedClientTypes = sl.Definations("byDefinationType", "Profile Type");
            ViewBag.SelectedPClient     = sl.Clients("AllVendors");
            if (List.Count > 0)
            {
                return(RedirectToAction("Edit", new { @Id = List[0].ClientId }));
            }
            else
            {
                return(View());
            }
        }
示例#4
0
        public ActionResult New()
        {
            AD_DefinationBL db = new AD_DefinationBL();

            ViewBag.Definations = db.ToList("AllActive");
            Sec_UserDefinationTypeBL dtb = new Sec_UserDefinationTypeBL();
            var User = Session["user"] as LoginInformation;

            ViewBag.DefinationTypes = dtb.ToListDefinations("GetDefinationTypeByUId", User.UserId.ToString());

            //AD_DefinationTypesBL dtb = new AD_DefinationTypesBL();
            //ViewBag.DefinationTypes = dtb.ToList("All");

            SWI.AirView.Common.SelectedList sl = new SWI.AirView.Common.SelectedList();
            ViewBag.SelectedDefinationTypes = sl.UserDefinationTypes(User.UserId.ToString());
            //
            return(View());
        }