Exemple #1
0
        public ActionResult ViewProject(int id, sbProjectDetailsService sbProject)
        {
            if (Session["username"] == null)
            {
                return(RedirectToAction("../Login/Login"));
            }
            else
            {
                DataSet ds = new DataSet();
                ds = sbProject.GetByProductID_Sb_ProjectDetails();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    sbProject.ProjectCategory = ds.Tables[0].Rows[0]["CategoryName"].ToString();
                    sbProject.ProjectName     = ds.Tables[0].Rows[0]["ProjectName"].ToString();
                    sbProject.Cost            = Convert.ToInt32(ds.Tables[0].Rows[0]["Cost"].ToString());
                    sbProject.Features        = ds.Tables[0].Rows[0]["Features"].ToString();
                    sbProject.Description     = ds.Tables[0].Rows[0]["Description"].ToString();
                    sbProject.TechnologyName  = ds.Tables[0].Rows[0]["TechnologyName"].ToString();
                    sbProject.Demo            = Convert.ToBoolean(ds.Tables[0].Rows[0]["Demo"].ToString());
                    sbProject.IsCustomizable  = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsCustomizable"].ToString());

                    sbProject.Screenshot = ds.Tables[0].Rows[0]["Screenshot"].ToString();
                    sbProject.IsFree     = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsFree"].ToString());
                }
                return(View(sbProject));
            }
        }
 public ActionResult ViewProject(int id, sbProjectDetailsService sbProject)
 {
     try
     {
         DataSet ds = new DataSet();
         ds = sbProject.GetByProductID_Sb_ProjectDetails();
         if (ds.Tables[0].Rows.Count > 0)
         {
             sbProject.ProjectCategory         = ds.Tables[0].Rows[0]["CategoryName"].ToString();
             sbProject.ProjectName             = ds.Tables[0].Rows[0]["ProjectName"].ToString();
             sbProject.Cost                    = Convert.ToInt32(ds.Tables[0].Rows[0]["Cost"].ToString());
             sbProject.Features                = ds.Tables[0].Rows[0]["Features"].ToString();
             sbProject.Description             = ds.Tables[0].Rows[0]["Description"].ToString();
             sbProject.TechnologyName          = ds.Tables[0].Rows[0]["TechnologyName"].ToString();
             sbProject.Demo                    = Convert.ToBoolean(ds.Tables[0].Rows[0]["Demo"].ToString());
             sbProject.IsCustomizable          = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsCustomizable"].ToString());
             sbProject.Screenshot              = ds.Tables[0].Rows[0]["Screenshot"].ToString();
             sbProject.IsFree                  = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsFree"].ToString());
             sbProject.CreatedByFirstName      = ds.Tables[0].Rows[0]["FirstName"].ToString();
             sbProject.CreatedByLastName       = ds.Tables[0].Rows[0]["LastName"].ToString();
             sbProject.CreatedByProfilePicture = ds.Tables[0].Rows[0]["ProfilePicture"].ToString();
             sbProject.Status                  = Convert.ToBoolean(ds.Tables[0].Rows[0]["Status"].ToString());
         }
         return(View(sbProject));
     }
     catch (Exception ee)
     {
         ViewBag.Message = "Error Occure";
         return(View());
     }
 }
Exemple #3
0
        public ActionResult DeleteProject(int?id, sbProjectDetailsService sbProject)
        {
            DataSet ds = new DataSet();

            ds = sbProject.GetByProductID_Sb_ProjectDetails();
            if (ds.Tables[0].Rows.Count > 0)
            {
                sbProject.ProjectCategory = ds.Tables[0].Rows[0]["CategoryName"].ToString();
                sbProject.ProjectName     = ds.Tables[0].Rows[0]["ProjectName"].ToString();
                sbProject.Cost            = Convert.ToInt32(ds.Tables[0].Rows[0]["Cost"].ToString());
                sbProject.Features        = ds.Tables[0].Rows[0]["Features"].ToString();
                sbProject.Description     = ds.Tables[0].Rows[0]["Description"].ToString();
                sbProject.TechnologyName  = ds.Tables[0].Rows[0]["TechnologyName"].ToString();
                sbProject.Demo            = Convert.ToBoolean(ds.Tables[0].Rows[0]["Demo"].ToString());
                sbProject.IsCustomizable  = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsCustomizable"].ToString());
                sbProject.Screenshot      = ds.Tables[0].Rows[0]["Screenshot"].ToString();
                sbProject.IsFree          = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsFree"].ToString());
            }
            return(View(sbProject));
        }