Exemplo n.º 1
0
 private bool isUserExisting()
 {
     string userid = this.txtSizes.Text;
     busSizes bussize = new busSizes();
     FrameWork.Sizes frmcat = new FrameWork.Sizes();
     frmcat = bussize.isUserExisting(userid);
     //FrameWork.Employees log = busemp.isUserExisting(userid);
     if (frmcat == null)
     {
         return false;
     }
     else if (userid.Equals(frmcat.ProductSize))
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            busSizes bussize = new busSizes();
            FrameWork.Sizes frmcat = new FrameWork.Sizes();
            frmcat.ProductSize = this.txtSizes.Text;

            isExisting = isUserExisting();
            if (isExisting.Equals(true))
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Size existing')", true);
            }
            else
            {
                bussize.insertSizes(frmcat);
            }
            DataTable dt = new DataTable("User");
            dt = bussize.allSize ();
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
Exemplo n.º 3
0
        private bool isUserExisting()
        {
            string   userid  = this.txtSizes.Text;
            busSizes bussize = new busSizes();

            FrameWork.Sizes frmcat = new FrameWork.Sizes();
            frmcat = bussize.isUserExisting(userid);
            //FrameWork.Employees log = busemp.isUserExisting(userid);
            if (frmcat == null)
            {
                return(false);
            }
            else if (userid.Equals(frmcat.ProductSize))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            busSizes bussize = new busSizes();

            FrameWork.Sizes frmcat = new FrameWork.Sizes();
            frmcat.ProductSize = this.txtSizes.Text;


            isExisting = isUserExisting();
            if (isExisting.Equals(true))
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Size existing')", true);
            }
            else
            {
                bussize.insertSizes(frmcat);
            }
            DataTable dt = new DataTable("User");

            dt = bussize.allSize();
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }