コード例 #1
0
        public int UpdateEmp(int EmployeeID, string FirstName, string MiddleName, string LastName, DateTime BirthDate,
                             string Gender, int CivilStatus, string SSNo, string TinNo, string Citizenship, string MobileNo, string HomePhoneNo,
                             string Street1, string Street2, string City, string State, string Country, string EducBackGround,
                             string Recognitions, string Email, string EnterpriseId, int Level, string LMU, string GMU, DateTime DateHired,
                             string WorkGroup, int Specialty, string ServiceLine, string Status, int LastModifiedBy)
        {
            AccentureDetailsCSD ASD = new AccentureDetailsCSD();

            ASD.Email        = Email;
            ASD.EnterpriseId = EnterpriseId;
            ASD.Level        = Level;
            ASD.LMU          = LMU;
            ASD.GMU          = GMU;
            ASD.DateHired    = DateHired;
            ASD.WorkGroup    = WorkGroup;
            ASD.Specialty    = Specialty;
            ASD.ServiceLine  = ServiceLine;

            ASD.Status         = Status;
            ASD.LastModifiedBy = LastModifiedBy;

            EmpInfoCSD ed = new EmpInfoCSD()
            {
                EmployeeId     = EmployeeID,
                FirstName      = FirstName,
                MiddleName     = MiddleName,
                LastName       = LastName,
                BirthDate      = BirthDate,
                Gender         = Gender,
                CivilStatus    = CivilStatus,
                SSNo           = SSNo,
                TinNo          = TinNo,
                Citizenship    = Citizenship,
                MobileNo       = MobileNo,
                HomePhoneNo    = HomePhoneNo,
                Street1        = Street1,
                Street2        = Street2,
                City           = City,
                State          = State,
                Country        = Country,
                EducBackGround = EducBackGround,
                Recognitions   = Recognitions,


                Ad = ASD
            };

            return(new ProjectManagerCSD().UpdateEmp(ed));
        }
コード例 #2
0
ファイル: ProjectManagerCSD.cs プロジェクト: Sayali22/ASP.NET
 public int UpdateEmp(EmpInfoCSD ec)
 {
     return(new EmployeeBusComp().UpdateEmp(ec));
 }
コード例 #3
0
ファイル: ProjectManagerCSD.cs プロジェクト: Sayali22/ASP.NET
 public int AddEmp(EmpInfoCSD ec)
 {
     return(new EmployeeBusComp().AddEmp(ec));
 }
コード例 #4
0
        public int AddEmp(EmpInfoCSD ec)
        {
            EmployeeCSD ed = new EmployeeCSD();

            return(ed.AddEmp(ec));
        }
コード例 #5
0
        //   string conStr = System.Configuration.ConfigurationManager.ConnectionStrings["test"].ToString();
        //System.Configuration.ConfigurationManager.AppSettings["conStr"].ToString();
        /// <summary>
        /// Inserts new Employee into database(ec)
        /// </summary>
        /// <param name="ec"></param>
        /// <returns></returns>
        public int AddEmp(EmpInfoCSD ec)
        {
            SqlParameter[] param = new SqlParameter[29];
            param[0]        = new SqlParameter("@FirstName", SqlDbType.VarChar);
            param[0].Value  = ec.FirstName;
            param[1]        = new SqlParameter("@MiddleName", SqlDbType.VarChar);
            param[1].Value  = ec.MiddleName;
            param[2]        = new SqlParameter("@LastName", SqlDbType.VarChar);
            param[2].Value  = ec.LastName;
            param[3]        = new SqlParameter("@BirthDate", SqlDbType.DateTime);
            param[3].Value  = ec.BirthDate;
            param[4]        = new SqlParameter("@Gender", SqlDbType.VarChar);
            param[4].Value  = ec.Gender;
            param[5]        = new SqlParameter("@CivilStatus", SqlDbType.Int);
            param[5].Value  = ec.CivilStatus;
            param[6]        = new SqlParameter("@SSNo", SqlDbType.VarChar);
            param[6].Value  = ec.SSNo;
            param[7]        = new SqlParameter("@TinNo", SqlDbType.VarChar);
            param[7].Value  = ec.TinNo;
            param[8]        = new SqlParameter("@Citizenship", SqlDbType.VarChar);
            param[8].Value  = ec.Citizenship;
            param[9]        = new SqlParameter("@MobileNo", SqlDbType.VarChar);
            param[9].Value  = ec.MobileNo;
            param[10]       = new SqlParameter("@HomePhoneNo", SqlDbType.VarChar);
            param[10].Value = ec.HomePhoneNo;
            param[11]       = new SqlParameter("@Street1", SqlDbType.VarChar);
            param[11].Value = ec.Street1;
            param[12]       = new SqlParameter("@Street2", SqlDbType.VarChar);
            param[12].Value = ec.Street2;
            param[13]       = new SqlParameter("@City", SqlDbType.VarChar);
            param[13].Value = ec.City;
            param[14]       = new SqlParameter("@State", SqlDbType.VarChar);
            param[14].Value = ec.State;
            param[15]       = new SqlParameter("@Country", SqlDbType.VarChar);
            param[15].Value = ec.Country;
            param[16]       = new SqlParameter("@EducBackground", SqlDbType.VarChar);
            param[16].Value = ec.EducBackGround;
            param[17]       = new SqlParameter("@Recognitions", SqlDbType.VarChar);
            param[17].Value = ec.Recognitions;
            param[18]       = new SqlParameter("@Email", SqlDbType.VarChar);
            param[18].Value = ec.Ad.Email;
            param[19]       = new SqlParameter("@EnterpriseId", SqlDbType.VarChar);
            param[19].Value = ec.Ad.EnterpriseId;
            param[20]       = new SqlParameter("@Level", SqlDbType.Int);
            param[20].Value = ec.Ad.Level;
            param[21]       = new SqlParameter("@LMU", SqlDbType.VarChar);
            param[21].Value = ec.Ad.LMU;
            param[22]       = new SqlParameter("@GMU", SqlDbType.VarChar);
            param[22].Value = ec.Ad.GMU;
            param[23]       = new SqlParameter("@DateHired", SqlDbType.DateTime);
            param[23].Value = ec.Ad.DateHired;
            param[24]       = new SqlParameter("@WorkGroup", SqlDbType.VarChar);
            param[24].Value = ec.Ad.WorkGroup;
            param[25]       = new SqlParameter("@Specialty", SqlDbType.Int);
            param[25].Value = ec.Ad.Specialty;
            param[26]       = new SqlParameter("@ServiceLine", SqlDbType.VarChar);
            param[26].Value = ec.Ad.ServiceLine;
            param[27]       = new SqlParameter("@Status", SqlDbType.VarChar);
            param[27].Value = ec.Ad.Status;
            param[28]       = new SqlParameter("@CreatedBy", SqlDbType.Int);
            param[28].Value = ec.Ad.CreatedBy;
            int i = SqlHelper.ExecuteNonQuery("Data Source=.;Initial Catalog=HRS;Integrated Security=True", CommandType.StoredProcedure, "spCreateEmployee", param);

            return(i);
        }