void ManageUserInfo() { objUserInfo = new Store.UserInfo.BusinessObject.UserInfo(); oblUserInfo = new Store.UserInfo.BusinessLogic.UserInfo(); try { if (cmdMode == Store.Common.CommandMode.M) { objUserInfo.UserID = Convert.ToInt32(txtUserID.Text); //objUserInfo.ModifiedBy = Convert.ToInt32(Session["UserId"]); } else { objUserInfo.UserID = 0; //objUserInfo.CreatedBy = Convert.ToInt32(Session["UserId"]); } objUserInfo.UserName = Convert.ToString(txtUserName.Text); objUserInfo.UserDisplayName = Convert.ToString(txtUserDisplayName.Text); objUserInfo.TypeofUserID = Convert.ToInt32(ddlTypeofUserID.SelectedItem.Value); objUserInfo.Address = Convert.ToString(txtAddress.Text); objUserInfo.CityID = Convert.ToInt32(ddlCityID.SelectedItem.Value); objUserInfo.StateID = Convert.ToInt32(ddlStateID.SelectedItem.Value); objUserInfo.CountryID = Convert.ToInt32(ddlCountryID.SelectedItem.Value); objUserInfo.PinID = Convert.ToInt32(txtPinID.Text); objUserInfo.ConcernPerson = Convert.ToInt32(txtConcernPerson.Text); objUserInfo.PhoneNo = Convert.ToInt32(txtPhoneNo.Text); objUserInfo.MobileNo = Convert.ToInt32(txtMobileNo.Text); objUserInfo.EmailID = Convert.ToString(txtEmailID.Text); objUserInfo.WebsiteAddress = Convert.ToString(txtWebsiteAddress.Text); if (cbIsActive.Checked) { objUserInfo.IsActive = 1; } else { objUserInfo.IsActive = 0; } objMessageInfo = oblUserInfo.ManageItemMaster(objUserInfo, cmdMode); } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(UserInfo).FullName, 1); } finally { objUserInfo = null; //objMessageInfo = null; oblUserInfo = null; } }
protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e) { cmdMode = CommandMode.D; objUserInfo = new Store.UserInfo.BusinessObject.UserInfo(); oblUserInfo = new Store.UserInfo.BusinessLogic.UserInfo(); try { ImageButton btndetails = sender as ImageButton; GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; objUserInfo.UserID = Convert.ToInt32(dgvUserInfo.DataKeys[gvrow.RowIndex].Value.ToString()); objUserInfo.UserName = ""; objUserInfo.UserDisplayName = ""; objUserInfo.TypeofUserID = 0; objUserInfo.Address = ""; objUserInfo.CityID = 0; objUserInfo.StateID = 0; objUserInfo.CountryID = 0; objUserInfo.PinID = 0; objUserInfo.ConcernPerson = 0; objUserInfo.PhoneNo = 0; objUserInfo.MobileNo = 0; objUserInfo.EmailID = ""; objUserInfo.WebsiteAddress = ""; objUserInfo.CreatedBy = 1; objMessageInfo = oblUserInfo.ManageItemMaster(objUserInfo, cmdMode); BindUserInfo(); updateUserBdInfo.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(UserInfo).FullName, 1); } finally { objUserInfo = null; objMessageInfo = null; oblTypeOfUser = null; } }