protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e) { cmdMode = CommandMode.D; objState = new Store.State.BusinessObject.State(); oblState = new Store.State.BusinessLogic.State(); try { ImageButton btndetails = sender as ImageButton; GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; objState.StateID = Convert.ToInt32(dgvState.DataKeys[gvrow.RowIndex].Value.ToString()); objState.StateName = ""; //objState.CreatedBy = Convert.ToInt32(Session["UserId"].ToString()); objMessageInfo = oblState.ManageItemMaster(objState, cmdMode); BindState(); updateStateBdInfo.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(State).FullName, 1); } finally { objState = null; objMessageInfo = null; oblState = null; } }
void ManageState() { objState = new Store.State.BusinessObject.State(); oblState = new Store.State.BusinessLogic.State(); try { if (cmdMode == Store.Common.CommandMode.M) { objState.StateID = Convert.ToInt32(txtStateId.Text); //objState.ModifiedBy = Convert.ToInt32(Session["UserId"].ToString()); } else { objState.StateID = 0; //objState.CreatedBy = Convert.ToInt32(Session["UserId"].ToString()); } objState.StateName = Convert.ToString(txtState.Text); objState.CountryID = Convert.ToInt32(ddlCountry.SelectedItem.Value); //objState.CreatedBy = Convert.ToInt32(Session["UserId"].ToString()); objMessageInfo = oblState.ManageItemMaster(objState, cmdMode); } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(State).FullName, 1); } finally { objState = null; //objMessageInfo = null; oblState = null; } }
void bindState(int id) { oblState = new Store.State.BusinessLogic.State(); try { objStatelist = oblState.GetAllStateList(id, 0, ""); if (objStatelist != null) { ListItem al = new ListItem("<-Select State->", "0", true); ddlStateID.DataSource = objStatelist; ddlStateID.DataTextField = "StateName"; ddlStateID.DataValueField = "StateID"; ddlStateID.DataBind(); ddlStateID.Items.Insert(0, al); } else { ddlStateID.DataSource = null; ddlStateID.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(UserInfo).FullName, 1); } finally { oblState = null; objStatelist = null; } }
void BindState() { oblState = new Store.State.BusinessLogic.State(); try { objStatelist = oblState.GetAllStateList(0, 0, ""); if (objStatelist != null) { dgvState.DataSource = objStatelist; dgvState.DataBind(); } else { dgvState.DataSource = null; dgvState.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(State).FullName, 1); } finally { oblState = null; objStatelist = null; } }
void BindState(int id) { oblState = new Store.State.BusinessLogic.State(); try { objStatelist = oblState.GetAllStateList(id, 0, ""); if (objStatelist != null) { ListItem al = new ListItem("<-Select State->", "0", true); ddlState.DataSource = objStatelist; ddlState.DataTextField = "StateName"; ddlState.DataValueField = "StateID"; ddlState.DataBind(); ddlState.Items.Insert(0, al); } else { ddlState.DataSource = null; ddlState.DataBind(); } } catch (Exception ex) { throw; } finally { oblState = null; objStatelist = null; } }