Beispiel #1
0
        public ActionResult UsersActive(System.Web.Mvc.FormCollection collection)
        {
            string USRID = collection["btnUsrId"];
            int    IS_AC;

            using (DataVw dMan = new DataVw())
            {
                dsUser = dMan.ExecuteView_S("USR", "*", USRID, "", "ID = ");
            }

            DataRow newrow = dsUser.Tables[0].Rows[0];

            if (Convert.ToBoolean(newrow["IS_AC"]))
            {
                IS_AC = 0;
            }
            else
            {
                IS_AC = 1;
            }
            newrow["ID"]    = USRID;
            newrow["IS_AC"] = IS_AC;
            //newrow["EDATE"] = DateTime.Now;
            //newrow["EUSRID"] = null;
            newrow["UDATE"] = DateTime.Now;
            //newrow["UUSRID"] = null;
            newrow["NOTE"] = "En Son Güncelleme İşlemi Gerçekleştirdi.";
            AgentGc data = new AgentGc();
            string  veri = data.DataModified("USR", newrow, dsUser.Tables[0]);

            return(Redirect("/Account/Users"));
        }
Beispiel #2
0
        public ActionResult PriceUpdateEndAction(string txtPRICENM, string txtPRICE, FormCollection collection)
        {
            string C       = collection["btnCatID"];
            string PRICEID = Session["PRICEID"].ToString();

            using (DataVw dMan = new DataVw())
            {
                dsTicketPrice = dMan.ExecuteView_S("PRICES", "*", PRICEID, "", "ID = ");
                dsLogTable    = dMan.ExecuteView_S("LOGTABLE", "*", "", "", "");
            }

            DataRow newrow = dsTicketPrice.Tables[0].Rows[0];

            newrow["ID"]      = PRICEID;
            newrow["PRICENM"] = txtPRICENM;
            newrow["PRICE"]   = txtPRICE;
            //newrow["EDATE"] = DateTime.Now;
            //newrow["EUSRID"] = null;
            newrow["UDATE"] = DateTime.Now;
            //newrow["UUSRID"] = null;
            newrow["NOTE"] = "En Son Güncelleme İşlemi Gerçekleştirdi.";
            AgentGc data = new AgentGc();
            string  veri = data.DataModified("PRICES", newrow, dsTicketPrice.Tables[0]);

            if (veri == "İşleminiz Tamamlandı..")
            {
                DataRow _newrow = dsLogTable.Tables[0].NewRow();
                _newrow["ID"]         = Guid.NewGuid();
                _newrow["LOGTABLE"]   = "PRICES";
                _newrow["LOGTABLEID"] = PRICEID;
                _newrow["LOGIP"]      = GetIp();
                _newrow["LOGUSRID"]   = Session["USRIDv"].ToString();
                _newrow["EDATE"]      = DateTime.Now;
                //newrow["EUSRID"] = null;
                _newrow["UDATE"] = DateTime.Now;
                //newrow["UUSRID"] = null;
                _newrow["NOTE"] = "Güncelleme İşlemi.";
                AgentGc _data = new AgentGc();
                string  _veri = _data.DataAdded("LOGTABLE", _newrow, dsLogTable.Tables[0]);
                Session["filmaddsuccess"] = true;
            }

            return(Redirect("/Film/PriceUpdate"));
        }
Beispiel #3
0
        public ActionResult FilmUpdateEndAction(string txtFILMNM, string txtFILMTYPID, string txtVISIONDATE, string txtFILMEXPLANATION, string txtFILMTIME, HttpPostedFileBase file, FormCollection collection)
        {
            string FILMID    = Session["FILMID"].ToString();
            string filmTypID = collection["FilmList"];
            string filefo    = "";

            using (DataVw dMan = new DataVw())
            {
                dsFilm     = dMan.ExecuteView_S("FILM", "*", FILMID, "", "ID = ");
                dsLogTable = dMan.ExecuteView_S("LOGTABLE", "*", "", "", "");
            }

            if (file != null)
            {
                string pic   = System.IO.Path.GetFileName(file.FileName);
                string path  = System.IO.Path.Combine(Server.MapPath("~/images/film"), pic);
                string pathd = "~/images/film/" + pic;
                // file is uploaded
                file.SaveAs(path);
                filefo = pathd;

                using (MemoryStream ms = new MemoryStream())
                {
                    file.InputStream.CopyTo(ms);
                    byte[] array = ms.GetBuffer();
                }
            }

            DataRow newrow = dsFilm.Tables[0].Rows[0];

            newrow["ID"]     = FILMID;
            newrow["FILMNM"] = txtFILMNM;
            if (filmTypID == "")
            {
                newrow["FILMTYPID"] = newrow["FILMTYPID"];
            }
            else
            {
                newrow["FILMTYPID"] = filmTypID;
            }

            if (filefo == "")
            {
                newrow["FILMIMG"] = newrow["FILMIMG"];
            }
            else
            {
                newrow["FILMIMG"] = filefo;
            }
            newrow["VISIONDATE"]  = Convert.ToDateTime(txtVISIONDATE);
            newrow["TIME"]        = txtFILMTIME;
            newrow["EXPLANATION"] = txtFILMEXPLANATION;
            //newrow["EDATE"] = DateTime.Now;
            //newrow["EUSRID"] = null;
            newrow["UDATE"] = DateTime.Now;
            //newrow["UUSRID"] = null;
            newrow["NOTE"] = "En Son Güncelleme İşlemi Gerçekleştirdi.";
            AgentGc data = new AgentGc();
            string  veri = data.DataModified("FILM", newrow, dsFilm.Tables[0]);

            if (veri == "İşleminiz Tamamlandı..")
            {
                DataRow _newrow = dsLogTable.Tables[0].NewRow();
                _newrow["ID"]         = Guid.NewGuid();
                _newrow["LOGTABLE"]   = "FILM";
                _newrow["LOGTABLEID"] = FILMID;
                _newrow["LOGIP"]      = GetIp();
                _newrow["LOGUSRID"]   = Session["USRIDv"].ToString();
                _newrow["EDATE"]      = DateTime.Now;
                //newrow["EUSRID"] = null;
                _newrow["UDATE"] = DateTime.Now;
                //newrow["UUSRID"] = null;
                _newrow["NOTE"] = "Güncelleme İşlemi.";
                AgentGc _data = new AgentGc();
                string  _veri = _data.DataAdded("LOGTABLE", _newrow, dsLogTable.Tables[0]);
                Session["filmaddsuccess"] = true;
            }
            return(Redirect("/Film/FilmUpdate"));
        }
Beispiel #4
0
        public ActionResult SelectUserInfoChange(string txtUSRNM, string txtFULNM, string txtPWD, string txtEMAIL, string txtCARDNO, string txtCVC, string txtSTKDAY, string txtSTKMONTH, HttpPostedFileBase file, System.Web.Mvc.FormCollection collection)
        {
            DataSet dsUser = new DataSet();
            string  USRID  = collection.AllKeys[8].ToString();
            string  filefo = "";

            using (DataVw dMan = new DataVw())
            {
                dsUser = dMan.ExecuteView_S("USR", "*", USRID, "", "ID = ");
            }

            //if (txtUSRNM.ToString() == "" || txtFULNM.ToString() == "" || txtPWD.ToString() == "" || txtEMAIL.ToString() == "" || txtCARDNO.ToString() == "" || txtCVC.ToString() == "" || txtSTKDAY.ToString() == "" || txtSTKMONTH.ToString() == "")
            //{
            //    return Content("<script language='javascript' type='text/javascript'>alert('Eksik veri girişi! Tüm Alanları Doldurunuz.');</script>");  ////Alert Mesajı Göndermek için.
            //    //ViewBag.addmessage = "Eksik veri girişi! Tüm Alanları Doldurunuz.";
            //    //return Redirect("/Account/Manage");
            //}
            //else
            //{
            if (file != null)
            {
                string pic   = System.IO.Path.GetFileName(file.FileName);
                string path  = System.IO.Path.Combine(Server.MapPath("~/images/avatar"), pic);
                string pathd = "~/images/avatar/" + pic;
                // file is uploaded
                file.SaveAs(path);
                filefo = pathd;

                using (MemoryStream ms = new MemoryStream())
                {
                    file.InputStream.CopyTo(ms);
                    byte[] array = ms.GetBuffer();
                }
            }

            DataRow newrow = dsUser.Tables[0].Rows[0];

            newrow["ID"]        = USRID;
            newrow["USRNM"]     = txtUSRNM;
            newrow["FULNM"]     = txtFULNM;
            newrow["EMAIL"]     = txtEMAIL;
            newrow["PWD"]       = CryptionHelper.Encrypt(txtPWD, "tb");
            newrow["IS_ADMIN"]  = 1;
            newrow["IS_SYSADM"] = 0;
            newrow["IS_HR"]     = 0;
            newrow["CHNG_PWD"]  = 0;
            if (filefo == "")
            {
                //newrow["AVATAR"] = "~/images/avatar/nullavatar.jpg";
                newrow["AVATAR"] = newrow["AVATAR"];
            }
            else
            {
                newrow["AVATAR"] = filefo;
            }
            if (!Convert.ToBoolean(Session["IS_SYSADM"]))
            {
                newrow["CARDNO"]   = txtCARDNO;
                newrow["CVC"]      = txtCVC;
                newrow["STKDAY"]   = txtSTKDAY;
                newrow["STKMONTH"] = txtSTKMONTH;
            }
            //newrow["EDATE"] = DateTime.Now;
            //newrow["EUSRID"] = null;
            newrow["UDATE"] = DateTime.Now;
            //newrow["UUSRID"] = null;
            newrow["NOTE"] = "En Son Güncelleme İşlemi Gerçekleştirdi.";
            AgentGc data = new AgentGc();
            string  veri = data.DataModified("USR", newrow, dsUser.Tables[0]);

            //return Content("<script language='javascript' type='text/javascript'>alert('" + veri + "');</script>");
            //ViewBag.addmessageinfo = veri;
            return(Redirect("/Account/Manage"));
            //}
            //return Redirect("/Account/Manage");
        }