Ejemplo n.º 1
0
 /// <summary>
 /// Check Whether Employee is exist or not
 /// </summary>
 /// <returns>integer value</returns>
 public DataTable CheckEmployeeExists(EmployeeLogin objLogin)
 {
     param          = new SqlParameter[3];
     param[0]       = new SqlParameter("@UserName", SqlDbType.VarChar);
     param[0].Value = objLogin.UserName;
     param[1]       = new SqlParameter("@Password", SqlDbType.VarChar);
     param[1].Value = objLogin.Password;
     param[2]       = new SqlParameter("@ActionType", SqlDbType.VarChar);
     param[2].Value = "CHECKUSER";
     objCon         = new DBConnection();
     return(objCon.ExecuteGetSP("spGetDetails", param));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Create New Employee
        /// </summary>
        /// <returns></returns>
        public int CreateEmployee(EmployeeDetails objEmployeeDetails, EmployeeLogin objEmployeeLogins, EmpBankDetails objBankDetails)
        {
            param          = new SqlParameter[21];
            param[0]       = new SqlParameter("@UserName", SqlDbType.VarChar);
            param[0].Value = objEmployeeLogins.UserName;

            param[1]       = new SqlParameter("@Password", SqlDbType.VarChar);
            param[1].Value = objEmployeeLogins.Password;

            param[2]       = new SqlParameter("@Email", SqlDbType.VarChar);
            param[2].Value = objEmployeeLogins.Email;

            param[3]       = new SqlParameter("@MobileNumber", SqlDbType.BigInt);
            param[3].Value = objEmployeeDetails.MobileNumber;

            param[4]       = new SqlParameter("@FirstName", SqlDbType.VarChar);
            param[4].Value = objEmployeeDetails.FirstName;

            param[5]       = new SqlParameter("@LastName", SqlDbType.VarChar);
            param[5].Value = objEmployeeDetails.LastName;

            param[6]       = new SqlParameter("@AddressLine1", SqlDbType.VarChar);
            param[6].Value = objEmployeeDetails.AddressLine1;

            param[7]       = new SqlParameter("@City", SqlDbType.VarChar);
            param[7].Value = objEmployeeDetails.City;

            param[8]       = new SqlParameter("@State", SqlDbType.VarChar);
            param[8].Value = objEmployeeDetails.State;

            param[9]       = new SqlParameter("@Country", SqlDbType.VarChar);
            param[9].Value = objEmployeeDetails.Country;

            param[10]       = new SqlParameter("@Pincode", SqlDbType.VarChar);
            param[10].Value = objEmployeeDetails.Pincode;

            param[11]       = new SqlParameter("@IsActive", SqlDbType.Bit);
            param[11].Value = objEmployeeDetails.isActive;

            param[12]       = new SqlParameter("@ActionType", SqlDbType.VarChar);
            param[12].Value = "INSERT";

            param[13]       = new SqlParameter("@BankName", SqlDbType.VarChar);
            param[13].Value = objBankDetails.BankName;

            param[14]       = new SqlParameter("@BankBranch", SqlDbType.VarChar);
            param[14].Value = objBankDetails.BankBranch;

            param[15]       = new SqlParameter("@BankIFSC", SqlDbType.VarChar);
            param[15].Value = objBankDetails.BankIFSCCode;

            param[16]       = new SqlParameter("@BankAccNo", SqlDbType.VarChar);
            param[16].Value = objBankDetails.BankAccountNumber;

            param[17]       = new SqlParameter("@BankAccountName", SqlDbType.VarChar);
            param[17].Value = objBankDetails.BankAccountName;

            param[18]       = new SqlParameter("@IsBankAccountActive", SqlDbType.VarChar);
            param[18].Value = objBankDetails.isActive;

            param[19]       = new SqlParameter("@LastModifiedBy", SqlDbType.Int);
            param[19].Value = objEmployeeDetails.AddedBy;

            param[20]       = new SqlParameter("@RoleID", SqlDbType.Int);
            param[20].Value = objEmployeeDetails.RoleID;


            objCon = new DBConnection();
            return(objCon.ExecuteSP("spEmployeeWithBankDetails", param));
        }