Esempio n. 1
0
    public void BindSupplierList()
    {
        DataSet dsSuplierMasterList = CSupplierMasterServices.SupplierMasterList();

        GvSupplierList.DataSource = dsSuplierMasterList;
        GvSupplierList.DataBind();
    }
Esempio n. 2
0
    protected void ButUpdate_Click(object sender, EventArgs e)
    {
        TblAddEdit.Visible = true;
        ButCancle.Visible  = true;
        ButInsert.Visible  = false;
        int intReturnValue = CSupplierMasterServices.SupplierUpdate(
            Convert.ToInt32(TxtSupplierId.Text),
            TxtSuppliername.Text,
            TxtAddress.Text,
            Txtarea.Text,
            Txtcity.Text,
            Convert.ToInt32(TxtPincode.Text),
            TxtContect.Text,
            TxtEmailId.Text);

        if (intReturnValue > 0)
        {
            BindSupplierList();
            TxtSuppliername.Text = "";
            TxtAddress.Text      = "";
            Txtarea.Text         = "";
            Txtcity.Text         = "";
            TxtPincode.Text      = "";
            TxtContect.Text      = "";
            TxtEmailId.Text      = "";
            Lblmsg.Text          = "Supplier Update";
        }
        else
        {
            Lblmsg.Text = "Error occured while Update Supplier.";
        }
    }
Esempio n. 3
0
    public void BindSuppliername()
    {
        DataSet dsSuplierMasterList = CSupplierMasterServices.SupplierMasterList();

        Dropsupplierlist.DataSource     = dsSuplierMasterList;
        Dropsupplierlist.DataTextField  = "Suppliername";
        Dropsupplierlist.DataValueField = "SupplierId";
        Dropsupplierlist.DataBind();
    }
Esempio n. 4
0
    protected void GvSupplierList_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        TblAddEdit.Visible = false;
        ButCancle.Visible  = true;
        ButUpdate.Visible  = true;
        ButInsert.Visible  = false;
        int             intSupplierId = Convert.ToInt32(GvSupplierList.DataKeys[e.RowIndex].Value);
        CSupplierMaster ObjSupplier   = new CSupplierMaster(intSupplierId);

        if (ObjSupplier.IsExit == true)
        {
            TxtSupplierId.Text   = ObjSupplier.SupplierId.ToString();
            TxtSuppliername.Text = ObjSupplier.Suppliername.ToString();
            TxtAddress.Text      = ObjSupplier.Address.ToString();
            Txtarea.Text         = ObjSupplier.Area.ToString();
            Txtcity.Text         = ObjSupplier.City.ToString();
            TxtContect.Text      = ObjSupplier.Contactno.ToString();
            TxtPincode.Text      = ObjSupplier.Pincode.ToString();
            TxtEmailId.Text      = ObjSupplier.EmailId.ToString();
        }
        int intReturnValue = CSupplierMasterServices.SupplierDelete(Convert.ToInt32(TxtSupplierId.Text));

        if (intReturnValue > 0)
        {
            BindSupplierList();
            TxtSupplierId.Text   = "";
            TxtSuppliername.Text = "";
            TxtAddress.Text      = "";
            Txtarea.Text         = "";
            Txtcity.Text         = "";
            TxtContect.Text      = "";
            TxtPincode.Text      = "";
            TxtEmailId.Text      = "";
            Lblmsg.Text          = "Supplier Delete.";
        }
        else
        {
            Lblmsg.Text = "Error occured while Delete Supplier.";
        }
    }