protected void gvCamsKarvy_ItemCommand(object source, GridCommandEventArgs e) { //int strSchemePlanCode = 0; string TransactionHead = string.Empty; string TransactionDescription = string.Empty; string TransactionType = string.Empty; string TransactionTypeFlag = string.Empty; string TransactionClassificationCode = string.Empty; DisplayType = ddlExternalSource.SelectedValue; if (e.CommandName == RadGrid.UpdateCommandName) { //strExternalCodeToBeEdited = Session["extCodeTobeEdited"].ToString(); CustomerBo customerBo = new CustomerBo(); bool isUpdated = false; GridEditableItem gridEditableItem = (GridEditableItem)e.Item; TextBox txtHead = (TextBox)e.Item.FindControl("txtHead"); DropDownList txtCode = (DropDownList)e.Item.FindControl("ddlclassificationCode"); TextBox txtDescription = (TextBox)e.Item.FindControl("txtDescription"); TextBox txtType = (TextBox)e.Item.FindControl("txttransactiontype"); TextBox txtflag = (TextBox)e.Item.FindControl("txtsourceflag"); string prevTransactionType = gvCamsKarvy.MasterTableView.DataKeyValues[e.Item.ItemIndex]["Transaction_Type"].ToString(); string prevTransactionDescription = gvCamsKarvy.MasterTableView.DataKeyValues[e.Item.ItemIndex]["Description"].ToString(); string prevTransactionHead = gvCamsKarvy.MasterTableView.DataKeyValues[e.Item.ItemIndex]["WKDTM_TransactionHead"].ToString(); string prevTransactionTypeFlag = gvCamsKarvy.MasterTableView.DataKeyValues[e.Item.ItemIndex]["WKDTM_TransactionTypeFlag"].ToString(); TransactionHead = txtHead.Text; TransactionDescription = txtDescription.Text; TransactionType = txtType.Text; TransactionTypeFlag = txtflag.Text; TransactionClassificationCode = txtCode.SelectedValue.ToString(); isUpdated = customerBo.EditDataTranslateMappingDetalis(prevTransactionHead, prevTransactionDescription, prevTransactionType, prevTransactionTypeFlag, TransactionHead, TransactionDescription, TransactionType, TransactionTypeFlag, TransactionClassificationCode); } //if (e.CommandName == RadGrid.DeleteCommandName) //{ // bool isDeleted = false; // customerBo = new CustomerBo(); // GridDataItem dataItem = (GridDataItem)e.Item; // TableCell strSchemePlanCodeForDelete = dataItem["PASP_SchemePlanCode"]; // TableCell strSchemePlanNameForDelete = dataItem["PASP_SchemePlanName"]; // TableCell StrExternalCodeForDelete = dataItem["PASC_AMC_ExternalCode"]; // TableCell strExternalTypeForDelete = dataItem["PASC_AMC_ExternalType"]; // strSchemePlanCode = int.Parse(strSchemePlanCodeForDelete.Text); // strExternalCode = StrExternalCodeForDelete.Text; // strExternalType = strExternalTypeForDelete.Text; // deletedDate = DateTime.Now; // isDeleted = customerBo.DeleteMappedSchemeDetails(strSchemePlanCode, strExternalCode, strExternalType, createdDate, editedDate, deletedDate); //} if (e.CommandName == RadGrid.PerformInsertCommandName) { CustomerBo customerBo = new CustomerBo(); bool isInserted = false; GridEditableItem gridEditableItem = (GridEditableItem)e.Item; TextBox txtHead = (TextBox)e.Item.FindControl("txtHead"); DropDownList txtCode = (DropDownList)e.Item.FindControl("ddlclassificationCode"); TextBox txtDescription = (TextBox)e.Item.FindControl("txtDescription"); TextBox txtType = (TextBox)e.Item.FindControl("txttransactiontype"); TextBox txtflag = (TextBox)e.Item.FindControl("txtsourceflag"); TransactionHead = txtHead.Text; TransactionDescription = txtDescription.Text; TransactionType = txtType.Text; TransactionTypeFlag = txtflag.Text; TransactionClassificationCode = txtCode.SelectedValue.ToString(); isInserted = customerBo.InsertDataTranslateMappingDetalis(TransactionHead, TransactionDescription, TransactionType, TransactionTypeFlag, TransactionClassificationCode); } if (DisplayType == "KARVY") { BindDataTranslatorDetails(); gvCamsKarvy.DataSource = dsDataTransDetails; gvCamsKarvy.DataBind(); } if (DisplayType == "CAMS" || DisplayType == "Sundaram") { BindDataTranslatorDetails(); gvCams.DataSource = dsDataTransDetails; gvCams.DataBind(); } if (DisplayType == "Templeton") { BindDataTranslatorDetails(); gvTempleton.DataSource = dsDataTransDetails; gvTempleton.DataBind(); } //BindDataTranslatorDetails(); }