protected void SupplierFormView_ItemInserting(object sender, FormViewInsertEventArgs e)
        {
            MfgDetails mfgInfo = new MfgDetails();
            DataKey    key     = SupplierFormView.DataKey;

            TextBox      txtOrgName  = (TextBox)SupplierFormView.FindControl("txtOrgName");
            DropDownList ddlPartName = (DropDownList)SupplierFormView.FindControl("ddlPartName");
            TextBox      txtAddress  = (TextBox)SupplierFormView.FindControl("txtAddress");

            TextBox txtPhone = (TextBox)SupplierFormView.FindControl("txtPhone");
            TextBox txtEmail = (TextBox)SupplierFormView.FindControl("txtEmail");



            mfgInfo.OrgName  = txtOrgName.Text;
            mfgInfo.PartName = ddlPartName.Text;
            mfgInfo.Address  = txtAddress.Text;
            mfgInfo.Phone    = txtPhone.Text;
            mfgInfo.Email    = txtEmail.Text;
            obj.InsertMfgDetails(mfgInfo);



            bindgrid();
        }
        protected void SupplierFormView_ItemDeleting(object sender, FormViewDeleteEventArgs e)
        {
            DataKey    key      = SupplierFormView.DataKey;
            MfgDetails mfgInfo  = new MfgDetails();
            Label      lblMfgId = (Label)SupplierFormView.FindControl("lblMfgId");

            mfgInfo.MfgID = Convert.ToInt32(key.Value.ToString());
            obj.DeleteMfgDetails(mfgInfo);

            bindgrid();
        }
        protected void SupplierFormView_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
            DataKey      key         = SupplierFormView.DataKey;
            MfgDetails   mfgInfo     = new MfgDetails();
            Label        lblMfgId    = (Label)SupplierFormView.FindControl("lblMfgId");
            TextBox      txtOrgName  = (TextBox)SupplierFormView.FindControl("txtOrgName");
            DropDownList ddlPartName = (DropDownList)SupplierFormView.FindControl("ddlPartName");
            TextBox      txtAddress  = (TextBox)SupplierFormView.FindControl("txtAddress");

            TextBox txtPhone = (TextBox)SupplierFormView.FindControl("txtPhone");
            TextBox txtEmail = (TextBox)SupplierFormView.FindControl("txtEmail");

            mfgInfo.MfgID    = Convert.ToInt32(lblMfgId.Text);
            mfgInfo.OrgName  = txtOrgName.Text;
            mfgInfo.PartName = ddlPartName.Text;
            mfgInfo.Address  = txtAddress.Text;
            mfgInfo.Phone    = txtPhone.Text;
            mfgInfo.Email    = txtEmail.Text;
            obj.UpdateMfgDetails(mfgInfo);



            bindgrid();
        }