Ejemplo n.º 1
0
        public bool RejectPo(PoandPoApp PoNo)
        {
            try
            {
                connection();

                string QueryEdit = "update T_PoApp set SmtStatus = '4' where PoNo = '" + PoNo.PoNo + "'";

                SqlCommand cmd = new SqlCommand(QueryEdit, conn);
                conn.Open();
                int i = cmd.ExecuteNonQuery();
                conn.Close();
                if (i >= 1)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        public bool EditDt(PoandPoApp poandPoApp, int byid)
        {
            try
            {
                DateTime dt = DateTime.Now;
                connection();

                string QueryEdit = "update T_PoApp set SmtStatus = '2',AppBy = '" + byid + "' ,AppDate = '" + dt + "'  where PoNo = '" + poandPoApp.PoNo + "'";

                SqlCommand cmd = new SqlCommand(QueryEdit, conn);
                conn.Open();
                int i = cmd.ExecuteNonQuery();
                conn.Close();
                if (i >= 1)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                return(false);
            }
        }
        public ActionResult ReJectPO(PoandPoApp poandPoApp)
        {
            QueryCRUD qr = new QueryCRUD();

            if (qr.RejectPo(poandPoApp))
            {
                return(RedirectToAction("ShowPo"));
            }



            return(View());
        }
        public ActionResult Holding(PoandPoApp poandPoApp)
        {
            QueryCRUD qr = new QueryCRUD();

            if (qr.Holding(poandPoApp))
            {
                return(RedirectToAction("ShowPo"));
            }



            return(View());
        }
Ejemplo n.º 5
0
        public ActionResult Approved(PoandPoApp poandPoApp)
        {
            QueryCRUD qr = new QueryCRUD();

            if (qr.EditDt(poandPoApp))
            {
                return(RedirectToAction("Index"));
            }



            return(View());
        }
        public ActionResult Approved(PoandPoApp poandPoApp, T_Admin t_Admin)
        {
            QueryCRUD qr       = new QueryCRUD();
            T_Admin   t_Admins = new T_Admin();

            if (Session["User_name"] != null)
            {
                t_Admin.User_name = Session["User_name"].ToString();
                t_Admins          = qr.Get_T_Admins(t_Admin.User_name);

                int byid = t_Admins.User_ID;

                if (qr.EditDt(poandPoApp, byid))
                {
                    return(RedirectToAction("ShowPo"));
                }
            }

            return(View());
        }