コード例 #1
0
    protected void Bindgv()
    {
        DataSet dsSizeMasterList = CSizeMasterServices.BindSizeMasterList();

        GvSizeMasterList.DataSource = dsSizeMasterList;
        GvSizeMasterList.DataBind();
    }
コード例 #2
0
    protected void ButInsert_Click(object sender, EventArgs e)
    {
        int intReturnValue = CSizeMasterServices.SizeMasterInsert((TxtType.Text).ToString());

        if (intReturnValue > 0)
        {
            lblmsg.Text = "Size Insert";
            Bindgv();
            TxtSizeId.Text = "";
            TxtType.Text   = "";
        }
        else
        {
            lblmsg.Text = "Error occured while inserting Size.";
        }
    }
コード例 #3
0
    protected void ButUpDate_Click(object sender, EventArgs e)
    {
        ButInsert.Visible = false;
        ButUpDate.Visible = true;
        int intReturnValue = CSizeMasterServices.SizeMasterUpdate(Convert.ToInt32(TxtSizeId.Text), (TxtType.Text).ToString());

        if (intReturnValue > 0)

        {
            lblmsg.Text    = "Size UpDate";
            TxtSizeId.Text = "";
            TxtType.Text   = "";
            Bindgv();
        }
        else
        {
            lblmsg.Text = "Error occured while Updateing Size";
        }
    }
コード例 #4
0
    protected void GvSizeMasterList_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int         intSizeId = Convert.ToInt32(GvSizeMasterList.DataKeys[e.RowIndex].Value);
        CSizeMaster ObjSize   = new CSizeMaster(intSizeId);

        if (ObjSize.IsExit == true)
        {
            TxtSizeId.Text = ObjSize.SizeId.ToString();
            TxtType.Text   = ObjSize.Desc.ToString();
        }
        int intReturnValue = CSizeMasterServices.SizeMasterDelete(Convert.ToInt32(TxtSizeId.Text));

        if (intReturnValue > 0)
        {
            lblmsg.Text = "Delete Data";
            Bindgv();
            TxtSizeId.Text = "";
            TxtType.Text   = "";
        }
        else
        {
            lblmsg.Text = "Error occured while Deleting Data.";
        }
    }