private void bindQualification() { belBookDetails objServiceTimelinesBEL = new belBookDetails(); BooksDetails_BLL objServiceTimelinesBLL = new BooksDetails_BLL(); DataSet ds = new DataSet(); try { if (ds != null) { ds = objServiceTimelinesBLL.GetQualification(); ddlQuaification.DataSource = ds; ddlQuaification.DataTextField = "Qualification"; ddlQuaification.DataValueField = "ID"; ddlQuaification.DataBind(); ddlQuaification.Items.Insert(0, new ListItem("--Select--", "0")); } } catch (Exception ex) { Response.Write("Oops! error occured :" + ex.Message.ToString()); } finally { objServiceTimelinesBEL = null; objServiceTimelinesBLL = null; } }
public DataSet GetUserRecords(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("sp_GetUserDetails", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@role", objBEL.Roll); cmd.Parameters.AddWithValue("@userID", objBEL.UserName); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
public DataSet GetBulkLandIA(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("[sp_GetListOfLandAvailable]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@NodeID", objBEL.NodeID); cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
public DataSet InsertDepartments(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("[sp_AddDepartments]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@UserName", objBEL.username); cmd.Parameters.AddWithValue("@DeptName", objBEL.DeptName); cmd.Parameters.AddWithValue("@DeptNickName", objBEL.DeptNickName); SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
public DataSet UpdateDesignationsDetails(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("[sp_UpdateDesignation]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@UserName", objBEL.username); cmd.Parameters.AddWithValue("@DesignationFullName", objBEL.DesignationFullName); cmd.Parameters.AddWithValue("@DesignationNickName", objBEL.DesignationNickName); cmd.Parameters.AddWithValue("@Grade", objBEL.Grade); cmd.Parameters.AddWithValue("@DesignationID", objBEL.DesignationID); SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
public void GetUserRecord(string username, string category) { objServiceTimelinesBEL.Roll = category; objServiceTimelinesBEL.UserName = username; DataSet ds = new DataSet(); try { ds = objServiceTimelinesBLL.GetUserRecords(objServiceTimelinesBEL); if (ds.Tables[0].Rows.Count >= 0) { lbldesignationid = ds.Tables[0].Rows[0]["DesignationID"].ToString(); int userID = Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString()); LoginInfo _objLoginInfo = new LoginInfo(username, category, userID); Session["objLoginInfo"] = _objLoginInfo; } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); Response.Write("Oops! error occured :" + ex.Message.ToString()); } finally { objServiceTimelinesBEL = null; objServiceTimelinesBLL = null; } masterMenu(Session["Type"].ToString().Trim()); }
public DataSet DeleteQualification(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("[sp_DeleteQualification]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@UserName", objBEL.username); cmd.Parameters.AddWithValue("@ID", objBEL.QualificationID); SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
private void bindgridforUsercreation() { belBookDetails objServiceTimelinesBEL = new belBookDetails(); BooksDetails_BLL objServiceTimelinesBLL = new BooksDetails_BLL(); DataSet ds = new DataSet(); try { ds = objServiceTimelinesBLL.GetgridforUsercreation(); if (ds != null) { gridUsercreationdetails.DataSource = ds; gridUsercreationdetails.DataBind(); } } catch (Exception ex) { Response.Write("Oops! error occured :" + ex.Message.ToString()); } finally { objServiceTimelinesBEL = null; objServiceTimelinesBLL = null; } }
public Int32 CheckLogin(belBookDetails objBEL) { int result; try { SqlCommand cmd = new SqlCommand(); if (objBEL.Roll == "1") { cmd = new SqlCommand("sp_InternalUserLogin", con); } cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@pLoginName", objBEL.UserName); cmd.Parameters.AddWithValue("@pPassword", objBEL.Password); //cmd.Parameters.AddWithValue("@Idendical", objBEL.Roll); //Add the output parameter to the command object SqlParameter outPutParameter = new SqlParameter(); outPutParameter.ParameterName = "@responseMessage"; outPutParameter.SqlDbType = System.Data.SqlDbType.NVarChar; outPutParameter.Direction = System.Data.ParameterDirection.Output; outPutParameter.Size = 50; cmd.Parameters.Add(outPutParameter); if (con.State == ConnectionState.Closed) { con.Open(); } result = Convert.ToInt32(cmd.ExecuteScalar()); cmd.Dispose(); //Retrieve the value of the output parameter if (result == 0) { objBEL.responseMessage = outPutParameter.Value.ToString(); return(result); } else { objBEL.responseMessage = outPutParameter.Value.ToString(); return(0); } } catch (Exception ex) { throw ex; } finally { if (con.State != ConnectionState.Closed) { con.Close(); } } }
public DataSet UpdateDesignationsDetails(belBookDetails objBel) { BooksDetails_DAL objDal = new BooksDetails_DAL(); try { return(objDal.UpdateDesignationsDetails(objBel)); } catch (Exception ex) { throw ex; } finally { objDal = null; } }
public DataSet GetAdvertisedPlot(belBookDetails objBel) { BooksDetails_DAL objDal = new BooksDetails_DAL(); try { return(objDal.GetAdvertisedPlot(objBel)); } catch (Exception ex) { throw ex; } finally { objDal = null; } }
public DataSet GetUserRecords(belBookDetails objBel) { BooksDetails_DAL objDal = new BooksDetails_DAL(); try { return(objDal.GetUserRecords(objBel)); } catch (Exception ex) { throw ex; } finally { objDal = null; } }
public DataSet DeleteQualification(belBookDetails objBel) { BooksDetails_DAL objDal = new BooksDetails_DAL(); try { return(objDal.DeleteQualification(objBel)); } catch (Exception ex) { throw ex; } finally { objDal = null; } }
public DataSet InsertDepartments(belBookDetails objBel) { BooksDetails_DAL objDal = new BooksDetails_DAL(); try { return(objDal.InsertDepartments(objBel)); } catch (Exception ex) { throw ex; } finally { objDal = null; } }
public Int32 CheckLogin(belBookDetails objBel) { BooksDetails_DAL objDal = new BooksDetails_DAL(); try { return(objDal.CheckLogin(objBel)); } catch (Exception ex) { throw ex; } //finally //{ // objDal = null; //} }
private void bindgridDepartments() { belBookDetails objServiceTimelinesBEL = new belBookDetails(); BooksDetails_BLL objServiceTimelinesBLL = new BooksDetails_BLL(); DataSet ds = new DataSet(); try { ds = objServiceTimelinesBLL.GetgridforDepartments(); if (ds != null) { Grid_Departments.DataSource = ds; Grid_Departments.DataBind(); } } catch (Exception ex) { Response.Write("Oops! error occured :" + ex.Message.ToString()); } }
private void bindgridQualification() { belBookDetails objServiceTimelinesBEL = new belBookDetails(); BooksDetails_BLL objServiceTimelinesBLL = new BooksDetails_BLL(); DataSet ds = new DataSet(); try { ds = objServiceTimelinesBLL.GetgridforQualification(); if (ds != null) { Grid_Qualification.DataSource = ds; Grid_Qualification.DataBind(); } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); Response.Write("Oops! error occured :" + ex.Message.ToString()); } }
protected void BindDDLNode() { belBookDetails objServiceTimelinesBEL = new belBookDetails(); BooksDetails_BLL objServiceTimelinesBLL = new BooksDetails_BLL(); DataSet dsR = new DataSet(); try { dsR = objServiceTimelinesBLL.GetAllNodeForDDl(); ddl_Node.DataSource = dsR.Tables[0]; ddl_Node.DataTextField = "ParkName"; ddl_Node.DataValueField = "ParkNo"; ddl_Node.DataBind(); ddl_Node.Items.Insert(0, new ListItem("--Select--", "0")); } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); Response.Write("Oops! error occured :" + ex.Message.ToString()); } }
public DataSet UpdateUserDetails(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("[sp_UpdateLoginUserInternal]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@pUserID", objBEL.UserID); cmd.Parameters.AddWithValue("@pUsername", objBEL.username); cmd.Parameters.AddWithValue("@pPassword", objBEL.Password); cmd.Parameters.AddWithValue("@pDesignationID", objBEL.Designation); cmd.Parameters.AddWithValue("@Qualification", objBEL.Qualification); cmd.Parameters.AddWithValue("@pEmpcode", objBEL.Empcode); cmd.Parameters.AddWithValue("@pJoiningDate", objBEL.JoiningDate); cmd.Parameters.AddWithValue("@pRetirementDate", objBEL.RetirementDate); cmd.Parameters.AddWithValue("@pContractType", objBEL.ContractType); cmd.Parameters.AddWithValue("@PhoneNo", objBEL.phoneNo); cmd.Parameters.AddWithValue("@emailID", objBEL.Email); cmd.Parameters.AddWithValue("@isActive", 1); cmd.Parameters.AddWithValue("@isDeleted", 0); cmd.Parameters.AddWithValue("@pEmployeename", objBEL.Employee); cmd.Parameters.AddWithValue("@DeptID", objBEL.DeptID); SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
public DataSet GetDepartmentDetailsByID(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("[spGetDepartmentdetailsByID]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@DeptID", objBEL.DeptID); SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }
private void BindPlotsInGrid() { objServiceTimelinesBEL.NodeID = Convert.ToInt32(ddl_Node.SelectedValue.Trim()); DataSet ds = new DataSet(); try { ds = objServiceTimelinesBLL.GetAdvertisedPlot(objServiceTimelinesBEL); if (ds.Tables.Count > 0) { if (ds.Tables[0].Rows.Count > 0) { btnSave.Enabled = true; GridPlot.DataSource = ds.Tables[0]; GridPlot.DataBind(); } else { string message = "Please note that for the industrial area you selected there are no plots available for allotment at this time. You can explore other industrial areas for the availability of plots."; System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "call_show", "DisplayMultiLineAlert('" + message + "');", true); btnSave.Enabled = false; GridPlot.DataSource = null; GridPlot.DataBind(); } } } catch (Exception ex) { Response.Write("Oops! error occured :" + ex.Message.ToString()); } finally { objServiceTimelinesBEL = null; objServiceTimelinesBLL = null; } }
public DataSet GetLoginDetailCheck(belBookDetails objBEL) { DataSet ds = new DataSet(); try { SqlCommand cmd = new SqlCommand("spGetInternalLoginCheck", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@pLoginName", objBEL.UserName); cmd.Parameters.AddWithValue("@pPassword", objBEL.Password); SqlDataAdapter adp = new SqlDataAdapter(cmd); adp.Fill(ds); cmd.Dispose(); } catch (Exception ex) { throw ex; } finally { ds.Dispose(); } return(ds); }