Example #1
0
        public ActionResult GeneralCall()
        {
            List <GeneralCall> CategoryList = new List <GeneralCall>();
            Property           p            = new Property();
            DataSet            ds           = new DataSet();

            p.OnTable = "FetchGeneralCall";

            ds = dl.FetchGeneralCall_sp(p);

            try
            {
                foreach (DataRow item in ds.Tables[0].Rows)
                {
                    GeneralCall m = new GeneralCall();

                    m.PId          = item["PId"].ToString();
                    m.PName        = item["PName"].ToString();
                    m.Phone        = item["Phone"].ToString();
                    m.Date         = item["Date"].ToString();
                    m.NextDate     = item["NextDate"].ToString();
                    m.CallType     = item["CallType"].ToString();
                    m.Note         = item["Note"].ToString();
                    m.CallDuration = item["CallDuration"].ToString();
                    m.AddedBy      = item["AddedBy"].ToString();
                    m.IsActive     = item["IsActive"].ToString();
                    CategoryList.Add(m);
                }
                ViewBag.CategoryList = CategoryList;
            }
            catch (Exception e)
            {
            }
            return(View());
        }
Example #2
0
        public ActionResult GeneralCall(GeneralCall c)
        {
            HttpCookie rxgoAdminCookie = Request.Cookies["rxgoAdmin"];
            string     AddedBy         = rxgoAdminCookie.Values["Hid"];

            c.AddedBy = AddedBy;
            try
            {
                if (dl.InsertGeneralCall_Sp(c) > 0)
                {
                    TempData["MSG"] = "General Call Added Successfully";
                }
            }
            catch (Exception ex)
            {
                TempData["MSG"] = "Something went wrong.";
                return(Redirect("/FrontOffice/GeneralCall"));
            }
            TempData["MSG"] = "General Call Added Successfully.";
            return(Redirect("/FrontOffice/GeneralCall"));
        }