Exemplo n.º 1
0
        public ActionResult Details(int id, SbUserService sbUser)
        {
            DataSet ds = new DataSet();

            ds = sbUser.GetByID_Sb_User();
            if (ds.Tables[0].Rows.Count > 0)
            {
                sbUser.FirstName    = ds.Tables[0].Rows[0]["FirstName"].ToString();
                sbUser.LastName     = ds.Tables[0].Rows[0]["LastName"].ToString();
                sbUser.EmailId      = ds.Tables[0].Rows[0]["EmailId"].ToString();
                sbUser.Password     = ds.Tables[0].Rows[0]["Password"].ToString();
                sbUser.MobileNumber = ds.Tables[0].Rows[0]["MobileNumber"].ToString();
                sbUser.CompanyURL   = ds.Tables[0].Rows[0]["CompanyURL"].ToString();
                //sbUser.IsSeller = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsSeller"].ToString());
                sbUser.Status = Convert.ToBoolean(ds.Tables[0].Rows[0]["Status"].ToString());
                if (Convert.ToString(ds.Tables[0].Rows[0]["ModifiedOn"]) == "")
                {
                    sbUser.ModifiedOn = "";
                }
                else
                {
                    sbUser.ModifiedOn = ds.Tables[0].Rows[0]["ModifiedOn"].ToString();
                }
            }
            return(View(sbUser));
        }
Exemplo n.º 2
0
 public ActionResult Update(int?id, SbUserService sbUser)
 {
     try
     {
         DataSet ds = new DataSet();
         ds = sbUser.GetByID_Sb_User();
         if (ds.Tables[0].Rows.Count > 0)
         {
             sbUser.FirstName          = ds.Tables[0].Rows[0]["FirstName"].ToString();
             sbUser.LastName           = ds.Tables[0].Rows[0]["LastName"].ToString();
             sbUser.EmailId            = ds.Tables[0].Rows[0]["EmailId"].ToString();
             sbUser.MobileNumber       = ds.Tables[0].Rows[0]["MobileNumber"].ToString();
             sbUser.CompanyURL         = ds.Tables[0].Rows[0]["CompanyURL"].ToString();
             sbUser.ProfilePicture     = ds.Tables[0].Rows[0]["ProfilePicture"].ToString();
             TempData["PreviousImage"] = sbUser.ProfilePicture;
         }
         return(View(sbUser));
     }
     catch (Exception ee)
     {
         ViewBag.Message = "Error Occured";
         return(ViewBag.Message);
     }
 }