protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e) { cmdMode = CommandMode.D; objClient = new Store.Client.BusinessObject.Client(); oblClient = new Store.Client.BusinessLogic.Client(); try { ImageButton btndetails = sender as ImageButton; GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; objClient.ClientID = Convert.ToInt32(dgvClient.DataKeys[gvrow.RowIndex].Value.ToString()); objClient.ClientName = ""; objClient.ClientDisplayName = ""; objClient.Address = ""; objClient.CityID = 0; objClient.StateID = 1; objClient.CountryID = 2; objClient.PinID = 3; objClient.CreatedBy = 1; objMessageInfo = oblClient.ManageClientMaster(objClient, cmdMode); BindClient(); updateClientBdInfo.Update(); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true); } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1); } finally { objClient = null; objMessageInfo = null; oblClient = null; } }
void BindClient() { oblClient = new Store.Client.BusinessLogic.Client(); try { objClientList = oblClient.GetAllClientList(0, 0, ""); if (objClientList != null) { dgvClient.DataSource = objClientList; dgvClient.DataBind(); } else { dgvClient.DataSource = null; dgvClient.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1); } finally { oblClient = null; objClientList = null; } }
void ManageClientCategory() { objClient = new Store.Client.BusinessObject.Client(); oblClient = new Store.Client.BusinessLogic.Client(); try { if (cmdMode == Store.Common.CommandMode.M) { objClient.ClientID = Convert.ToInt32(txtClientId.Text); //objClient.ModifiedBy = Convert.ToInt32(Session["UserId"].ToString()); } else { objClient.ClientID = 0; //objClient.CreatedBy = Convert.ToInt32(Session["UserId"].ToString()); } objClient.ClientName = Convert.ToString(txtClientName.Text); objClient.ClientDisplayName = Convert.ToString(txtClientDisplayName.Text); objClient.Address = Convert.ToString(txtAddress.Text); objClient.CityID = Convert.ToInt32(ddlCity.SelectedItem.Value); objClient.StateID = Convert.ToInt32(ddlState.SelectedItem.Value); objClient.CountryID = Convert.ToInt32(ddlCountry.SelectedItem.Value); objClient.PinID = Convert.ToInt32(txtPinId.Text); if (cbIsActive.Checked) { objClient.IsActive = 1; } else { objClient.IsActive = 0; } objMessageInfo = oblClient.ManageClientMaster(objClient, cmdMode); } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1); } finally { objClient = null; //objMessageInfo = null; oblClient = null; } }
void getDetail(int id) { try { objClient = new Store.Client.BusinessObject.Client(); oblClient = new Store.Client.BusinessLogic.Client(); objClient = oblClient.GetAllClient(id, 1, "1"); lblName.Text = objClient.ClientDisplayName; } catch { } finally { objClient = null; oblClient = null; } }