protected void gvAmcv_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "P") { GridViewRow gvr = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer; CustomerMasterId = Convert.ToInt32(gvAmcv.DataKeys[gvr.RowIndex].Values[1].ToString()); CustomerPurchaseId = Convert.ToInt32(gvAmcv.DataKeys[gvr.RowIndex].Values[2].ToString()); AmcvId = Convert.ToInt64(e.CommandArgument.ToString()); CreateDocket(); Business.Service.ServiceBook objServiceBook = new Business.Service.ServiceBook(); objServiceBook.Service_AmcvProcess_Save(AmcvId); LoadAmcv(); } } catch (Exception ex) { ex.WriteException(); Message.IsSuccess = false; Message.Text = "Sorry! we can not receive your docket. Please refresh this page and try again.."; Message.Show = true; } }