protected void chkactive_CheckedChanged(object sender, EventArgs e)
        {
            try
            {
                GridViewRow row       = (sender as CheckBox).Parent.Parent as GridViewRow;
                CheckBox    chkactive = (CheckBox)row.FindControl("chkactive");

                InventoryServiceClient lclsService = new InventoryServiceClient();

                if (chkactive.Checked == true)
                {
                    lclsService.DeleteVendor(Convert.ToInt64(row.Cells[2].Text), true, defaultPage.UserId);
                }
                else
                {
                    lclsService.DeleteVendor(Convert.ToInt64(row.Cells[2].Text), false, defaultPage.UserId);
                    EventLogger log = new EventLogger(config);
                    log.LogInformation(msgdelte.Replace("<<Vendor>>", row.Cells[4].Text.ToString()));
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.VendorDeleteMessage.Replace("<<Vendor>>", row.Cells[4].Text.ToString()), true);
                }
                BindvendorGrid();
            }
            catch (Exception ex)
            {
                EventLogger log = new EventLogger(config);
                log.LogException(ex);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.VendorErrorMessage.Replace("<<Vendor>>", ex.Message), true);
            }
        }
 protected void btndeletepop_Click(object sender, EventArgs e)
 {
     try
     {
         InventoryServiceClient lclsService = new InventoryServiceClient();
         string lstrMessage = lclsService.DeleteVendor(Convert.ToInt64(hiddenVendorID.Value), false, defaultPage.UserId);
         if (lstrMessage == "Deleted Successfully")
         {
             BindvendorGrid();
             EventLogger log = new EventLogger(config);
             log.LogInformation(msgdelte.Replace("<<Vendor>>", hdnvendor.Value));
             ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.VendorDeleteMessage.Replace("<<Vendor>>", hdnvendor.Value), true);
         }
     }
     catch (Exception ex)
     {
         EventLogger log = new EventLogger(config);
         log.LogException(ex);
         ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.VendorErrorMessage.Replace("<<Vendor>>", ex.Message), true);
     }
 }