MrBaseInf.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:42k
- using System;
- using System.Data;
- using System.Data.SqlClient;
- using qminoa.Common.Data;
- namespace qminoa.DA
- {
- public class MrBaseInf :IDisposable
- {
- private string conStr ;
- private SqlConnection con ;
- private SqlDataAdapter commandAdp ;
- private string paramChg(string str)
- {
- str = "@"+str;
- return str;
- }
- public DataSet GetEmpConData_By_ConID(int conID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpConInfByConID";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpConData.CONID_FIELD),SqlDbType.Int);
- param.Value = conID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public bool UpdateMrContact(EmpConData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "UpdateMrContact";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpConData.CONID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpConData.CATETORY_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.FDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpConData.TDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpConData.POSILEVL_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.SALALEVL_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.ANNSALA_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.STATUS_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.CONNOTE_FIELD),SqlDbType.Text);
- command.Parameters[paramChg(EmpConData.CONID_FIELD)].SourceColumn = EmpConData.CONID_FIELD;
- command.Parameters[paramChg(EmpConData.CATETORY_FIELD)].SourceColumn = EmpConData.CATETORY_FIELD;
- command.Parameters[paramChg(EmpConData.FDATE_FIELD)].SourceColumn = EmpConData.FDATE_FIELD;
- command.Parameters[paramChg(EmpConData.TDATE_FIELD)].SourceColumn = EmpConData.TDATE_FIELD;
- command.Parameters[paramChg(EmpConData.POSILEVL_FIELD)].SourceColumn = EmpConData.POSILEVL_FIELD;
- command.Parameters[paramChg(EmpConData.SALALEVL_FIELD)].SourceColumn = EmpConData.SALALEVL_FIELD;
- command.Parameters[paramChg(EmpConData.ANNSALA_FIELD)].SourceColumn = EmpConData.ANNSALA_FIELD;
- command.Parameters[paramChg(EmpConData.STATUS_FIELD)].SourceColumn = EmpConData.STATUS_FIELD;
- command.Parameters[paramChg(EmpConData.CONNOTE_FIELD)].SourceColumn = EmpConData.CONNOTE_FIELD;
-
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empData,EmpConData.EMPCONTACT_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public bool InsertMrContact(EmpConData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "InsertMrContact";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpConData.CATETORY_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.FDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpConData.TDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpConData.POSILEVL_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.SALALEVL_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.ANNSALA_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.STATUS_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpConData.CONNOTE_FIELD),SqlDbType.Text);
- command.Parameters[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- command.Parameters[paramChg(EmpConData.CATETORY_FIELD)].SourceColumn = EmpConData.CATETORY_FIELD;
- command.Parameters[paramChg(EmpConData.FDATE_FIELD)].SourceColumn = EmpConData.FDATE_FIELD;
- command.Parameters[paramChg(EmpConData.TDATE_FIELD)].SourceColumn = EmpConData.TDATE_FIELD;
- command.Parameters[paramChg(EmpConData.POSILEVL_FIELD)].SourceColumn = EmpConData.POSILEVL_FIELD;
- command.Parameters[paramChg(EmpConData.SALALEVL_FIELD)].SourceColumn = EmpConData.SALALEVL_FIELD;
- command.Parameters[paramChg(EmpConData.ANNSALA_FIELD)].SourceColumn = EmpConData.ANNSALA_FIELD;
- command.Parameters[paramChg(EmpConData.STATUS_FIELD)].SourceColumn = EmpConData.STATUS_FIELD;
- command.Parameters[paramChg(EmpConData.CONNOTE_FIELD)].SourceColumn = EmpConData.CONNOTE_FIELD;
-
- commandAdp.InsertCommand = command;
- commandAdp.Update(empData,EmpConData.EMPCONTACT_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public bool DeleteMrContact(int conID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "DeleteMrContact";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpConData.CONID_FIELD),SqlDbType.Int);
- param.Value = conID;
- command.Parameters.Add(param);
- con.Open();
- int result = command.ExecuteNonQuery();
- con.Close();
- if(result>0)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- public DataSet GetEmpConData(int empID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpConInf";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Value = empID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public bool InsertMrArchive(EmpArcData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "InsertMrArchive";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpArcData.CATETORY_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.FDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpArcData.TDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpArcData.BRANAME_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.DEPNAME_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.POSITION_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.REASON_FIELD),SqlDbType.Text);
- command.Parameters.Add(paramChg(EmpArcData.ARCNOTE_FIELD),SqlDbType.Text);
- command.Parameters[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- command.Parameters[paramChg(EmpArcData.CATETORY_FIELD)].SourceColumn = EmpArcData.CATETORY_FIELD;
- command.Parameters[paramChg(EmpArcData.FDATE_FIELD)].SourceColumn = EmpArcData.FDATE_FIELD;
- command.Parameters[paramChg(EmpArcData.TDATE_FIELD)].SourceColumn = EmpArcData.TDATE_FIELD;
- command.Parameters[paramChg(EmpArcData.BRANAME_FIELD)].SourceColumn = EmpArcData.BRANAME_FIELD;
- command.Parameters[paramChg(EmpArcData.DEPNAME_FIELD)].SourceColumn = EmpArcData.DEPNAME_FIELD;
- command.Parameters[paramChg(EmpArcData.POSITION_FIELD)].SourceColumn = EmpArcData.POSITION_FIELD;
- command.Parameters[paramChg(EmpArcData.REASON_FIELD)].SourceColumn = EmpArcData.REASON_FIELD;
- command.Parameters[paramChg(EmpArcData.ARCNOTE_FIELD)].SourceColumn = EmpArcData.ARCNOTE_FIELD;
- commandAdp.InsertCommand = command;
- commandAdp.Update(empData,EmpArcData.EMPARCHIVE_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public bool UpdateMrArchive(EmpArcData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "UpdateMrArchive";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpArcData.ARCID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpArcData.CATETORY_FIELD),SqlDbType.VarChar) ;
- command.Parameters.Add(paramChg(EmpArcData.FDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpArcData.TDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpArcData.BRANAME_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.DEPNAME_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.POSITION_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpArcData.REASON_FIELD),SqlDbType.Text);
- command.Parameters.Add(paramChg(EmpArcData.ARCNOTE_FIELD),SqlDbType.Text);
- //
- //
- //
- command.Parameters[paramChg(EmpArcData.ARCID_FIELD)].SourceColumn = EmpArcData.ARCID_FIELD;
- command.Parameters[paramChg(EmpArcData.CATETORY_FIELD)].SourceColumn = EmpArcData.CATETORY_FIELD;
- command.Parameters[paramChg(EmpArcData.FDATE_FIELD)].SourceColumn = EmpArcData.FDATE_FIELD;
- command.Parameters[paramChg(EmpArcData.TDATE_FIELD)].SourceColumn = EmpArcData.TDATE_FIELD;
- command.Parameters[paramChg(EmpArcData.BRANAME_FIELD)].SourceColumn = EmpArcData.BRANAME_FIELD;
- command.Parameters[paramChg(EmpArcData.DEPNAME_FIELD)].SourceColumn = EmpArcData.DEPNAME_FIELD;
- command.Parameters[paramChg(EmpArcData.POSITION_FIELD)].SourceColumn = EmpArcData.POSITION_FIELD;
- command.Parameters[paramChg(EmpArcData.REASON_FIELD)].SourceColumn = EmpArcData.REASON_FIELD;
- command.Parameters[paramChg(EmpArcData.ARCNOTE_FIELD)].SourceColumn = EmpArcData.ARCNOTE_FIELD;
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empData,EmpArcData.EMPARCHIVE_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public DataSet GetEmpArcData_By_ArcID(int arcID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpArcInfByArcID";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpArcData.ARCID_FIELD),SqlDbType.Int);
- param.Value = arcID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public bool DeleteMrArchive(int arcID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "DeleteMrArchive";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpArcData.ARCID_FIELD),SqlDbType.Int);
- param.Value = arcID;
- command.Parameters.Add(param);
- con.Open();
- int result = command.ExecuteNonQuery();
- con.Close();
- if(result>0)
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- public bool UpdateMrVita(EmpVisaData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "UpdateMrVita";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpVisaData.VISAID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpVisaData.FDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpVisaData.TDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpVisaData.COMMPANY_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpVisaData.DEPNAME_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpVisaData.POSITION_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpVisaData.VISANOTE_FIELD),SqlDbType.Text);
- //
- //
- //
- command.Parameters[paramChg(EmpVisaData.VISAID_FIELD)].SourceColumn = EmpVisaData.VISAID_FIELD;
- command.Parameters[paramChg(EmpVisaData.FDATE_FIELD)].SourceColumn = EmpVisaData.FDATE_FIELD;
- command.Parameters[paramChg(EmpVisaData.TDATE_FIELD)].SourceColumn = EmpVisaData.TDATE_FIELD;
- command.Parameters[paramChg(EmpVisaData.COMMPANY_FIELD)].SourceColumn = EmpVisaData.COMMPANY_FIELD;
- command.Parameters[paramChg(EmpVisaData.DEPNAME_FIELD)].SourceColumn = EmpVisaData.DEPNAME_FIELD;
- command.Parameters[paramChg(EmpVisaData.POSITION_FIELD)].SourceColumn = EmpVisaData.POSITION_FIELD;
- command.Parameters[paramChg(EmpVisaData.VISANOTE_FIELD)].SourceColumn = EmpVisaData.VISANOTE_FIELD;
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empData,EmpVisaData.EMPVISA_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public bool InsertMrVita(EmpVisaData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "InsertMrVita";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpVisaData.FDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpVisaData.TDATE_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpVisaData.COMMPANY_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpVisaData.DEPNAME_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpVisaData.POSITION_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpVisaData.VISANOTE_FIELD),SqlDbType.Text);
- command.Parameters[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- command.Parameters[paramChg(EmpVisaData.FDATE_FIELD)].SourceColumn = EmpVisaData.FDATE_FIELD;
- command.Parameters[paramChg(EmpVisaData.TDATE_FIELD)].SourceColumn = EmpVisaData.TDATE_FIELD;
- command.Parameters[paramChg(EmpVisaData.COMMPANY_FIELD)].SourceColumn = EmpVisaData.COMMPANY_FIELD;
- command.Parameters[paramChg(EmpVisaData.DEPNAME_FIELD)].SourceColumn = EmpVisaData.DEPNAME_FIELD;
- command.Parameters[paramChg(EmpVisaData.POSITION_FIELD)].SourceColumn = EmpVisaData.POSITION_FIELD;
- command.Parameters[paramChg(EmpVisaData.VISANOTE_FIELD)].SourceColumn = EmpVisaData.VISANOTE_FIELD;
- commandAdp.InsertCommand = command;
- commandAdp.Update(empData,EmpVisaData.EMPVISA_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public bool DeleteMrVita(int visaID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "DeleteMrVita";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpVisaData.VISAID_FIELD),SqlDbType.Int);
- param.Value = visaID;
- command.Parameters.Add(param);
- int result =0;
- try
- {
- con.Open();
- result = command.ExecuteNonQuery();
- con.Close();
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return (result>0)?true:false;
- }
- public DataSet GetEmpArcData(int empID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpArcInf";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Value = empID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public bool UpdateEmpEduInf(EmpBaseData empData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "UpdateEmpEduInf";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- command.Parameters.Add(paramChg(EmpBaseData.SCHOOL1_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.SPECIAL1_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.GERTIME1_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpBaseData.EDUCAT1_FIELD),SqlDbType.VarChar);
-
- command.Parameters.Add(paramChg(EmpBaseData.SCHOOL2_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.SPECIAL2_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.GERTIME2_FIELD),SqlDbType.DateTime);
- command.Parameters.Add(paramChg(EmpBaseData.EDUCAT2_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.QULI1_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.QULI2_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.QULI3_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.QULI4_FIELD),SqlDbType.VarChar);
- command.Parameters.Add(paramChg(EmpBaseData.EDUNOTE_FIELD),SqlDbType.Text);
- command.Parameters[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- command.Parameters[paramChg(EmpBaseData.SCHOOL1_FIELD)].SourceColumn = EmpBaseData.SCHOOL1_FIELD;
- command.Parameters[paramChg(EmpBaseData.SPECIAL1_FIELD)].SourceColumn = EmpBaseData.SPECIAL1_FIELD;
- command.Parameters[paramChg(EmpBaseData.GERTIME1_FIELD)].SourceColumn = EmpBaseData.GERTIME1_FIELD;
- command.Parameters[paramChg(EmpBaseData.EDUCAT1_FIELD)].SourceColumn = EmpBaseData.EDUCAT1_FIELD;
- command.Parameters[paramChg(EmpBaseData.SCHOOL2_FIELD)].SourceColumn = EmpBaseData.SCHOOL2_FIELD;
- command.Parameters[paramChg(EmpBaseData.SPECIAL2_FIELD)].SourceColumn = EmpBaseData.SPECIAL2_FIELD;
- command.Parameters[paramChg(EmpBaseData.GERTIME2_FIELD)].SourceColumn = EmpBaseData.GERTIME2_FIELD;
- command.Parameters[paramChg(EmpBaseData.EDUCAT2_FIELD)].SourceColumn = EmpBaseData.EDUCAT2_FIELD;
- command.Parameters[paramChg(EmpBaseData.QULI1_FIELD)].SourceColumn = EmpBaseData.QULI1_FIELD;
- command.Parameters[paramChg(EmpBaseData.QULI2_FIELD)].SourceColumn = EmpBaseData.QULI2_FIELD;
- command.Parameters[paramChg(EmpBaseData.QULI3_FIELD)].SourceColumn = EmpBaseData.QULI3_FIELD;
- command.Parameters[paramChg(EmpBaseData.QULI4_FIELD)].SourceColumn = EmpBaseData.QULI4_FIELD;
- command.Parameters[paramChg(EmpBaseData.EDUNOTE_FIELD)].SourceColumn = EmpBaseData.EDUNOTE_FIELD;
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empData,EmpBaseData.EMP_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public DataSet GetEmpVisaData_By_VisaID(int visaID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpVisaInfByVisaID";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpVisaData.VISAID_FIELD),SqlDbType.Int);
- param.Value = visaID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public DataSet GetEmpVisaData(int empID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpVisaInf";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Value = empID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public bool StopEmpLogin(int empID,int allowLogin)
- {
- SqlCommand command = new SqlCommand();
- command.Connection = con;
- command.CommandText = "StopEmpLogin";
- command.CommandType = CommandType.StoredProcedure;
- SqlParameter param = new SqlParameter(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Value = empID;
- command.Parameters.Add(paramChg(EmpBaseData.ALLOWLOGIN_FIELD),SqlDbType.Bit);
- command.Parameters[paramChg(EmpBaseData.ALLOWLOGIN_FIELD)].Value = allowLogin;
- command.Parameters.Add(param);
- try
- {
- con.Open();
- command.ExecuteNonQuery();
- con.Close();
- }
- catch
- {
- return false;
- }
- return true;
- }
- public DataSet GetEmpDataStoped()
- {
- SqlCommand command = new SqlCommand();
- command.Connection = con;
- command.CommandText = "GetEmpInfStoped";
- command.CommandType = CommandType.StoredProcedure;
- commandAdp.SelectCommand = command ;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public DataSet GetEmpPicData(int empID)
- {
- SqlCommand command = new SqlCommand();
-
- command.CommandText = "GetEmpPic";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.Parameters.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- command.Parameters[paramChg(EmpBaseData.EMPID_FIELD)].Value = empID;
-
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public void UpdateEmpPic(int empID,byte[] byteArray)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "UpdateMrPhoto";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameterCollection param = command.Parameters;
- param.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.PHOTO_SIZE_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.PHOTO_CONTENT_FIELD),SqlDbType.Image);
- param[paramChg(EmpBaseData.EMPID_FIELD)].Value = empID;
- if(byteArray != null)
- {
- param[paramChg(EmpBaseData.PHOTO_SIZE_FIELD)].Value = byteArray.Length;
- param[paramChg(EmpBaseData.PHOTO_CONTENT_FIELD)].Value = byteArray;
- }
- else
- {
- param[paramChg(EmpBaseData.PHOTO_SIZE_FIELD)].Value = DBNull.Value;
- param[paramChg(EmpBaseData.PHOTO_CONTENT_FIELD)].Value = DBNull.Value;
- }
- con.Open();
- command.ExecuteNonQuery();
- con.Close();
-
- }
- public DataSet GetEmpData_By_QueryStr(string branchID,string depID,string empName)
- {
- string queryStr = "select i.EmpID,i.LoginID,i.EmpName,i.Email,i.OfficeTel,i.OfficeFax,i.Mobile,i.PhotoSize,j.DepName,k.SimpleCode from mrBaseInf i,mrDepartment j,mrBranch k where i.AllowLogin = 1 and i.DepID = j.DepID and k.BranchID = "+branchID ;
- if(empName!=string.Empty)
- {
- queryStr = queryStr + " and " ;
- queryStr = queryStr + " i.EmpName = '"+empName+"'";
- }
- if(depID!=string.Empty)
- {
- queryStr = queryStr + " and ";
- queryStr = queryStr + " i.DepID = "+depID;
- }
- else
- {
- queryStr = queryStr + " and ";
- queryStr = queryStr + " i.DepID in(select DepID from mrDepartment where BranchID = "+branchID+" )";
- }
- SqlCommand command = new SqlCommand();
- command.CommandText = queryStr;
- command.Connection = con;
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public DataSet GetEmpBaseData_By_EmpID(int empID)
- {
- SqlCommand command = new SqlCommand();
- command.CommandText = "GetEmpBaseInfByEmpID";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameter param = new SqlParameter(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Value = empID;
- command.Parameters.Add(param);
- commandAdp.SelectCommand = command;
- DataSet data = new DataSet();
- try
- {
- commandAdp.Fill(data);
- }
- catch(Exception ex)
- {
- throw new ApplicationException(ex.ToString());
- }
- return data;
- }
- public int InsertMrBaseInf(EmpBaseData empBaseData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.CommandText = "InsertMrBaseInf";
- SqlParameterCollection param = command.Parameters;
- SqlParameter paramTmp = new SqlParameter("@Identify",SqlDbType.Int);
- paramTmp.Direction = ParameterDirection.ReturnValue;
- param.Add(paramTmp);
- param.Add(paramChg(DepData.DEPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.EMPNAME_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.LOGINID_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.PASSWORD_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SEX_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.EMPCODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.EMAIL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.OFFICETEL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.OFFICEFAX_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.MOBILE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.POSITION_FIELD),SqlDbType.VarChar);
- param[paramChg(DepData.DEPID_FIELD)].SourceColumn = DepData.DEPID_FIELD;
- param[paramChg(EmpBaseData.EMPNAME_FIELD)].SourceColumn = EmpBaseData.EMPNAME_FIELD;
- param[paramChg(EmpBaseData.LOGINID_FIELD)].SourceColumn = EmpBaseData.LOGINID_FIELD;
- param[paramChg(EmpBaseData.PASSWORD_FIELD)].SourceColumn = EmpBaseData.PASSWORD_FIELD;
- param[paramChg(EmpBaseData.SEX_FIELD)].SourceColumn = EmpBaseData.SEX_FIELD;
- param[paramChg(EmpBaseData.EMPCODE_FIELD)].SourceColumn = EmpBaseData.EMPCODE_FIELD;
- param[paramChg(EmpBaseData.EMAIL_FIELD)].SourceColumn = EmpBaseData.EMAIL_FIELD;
- param[paramChg(EmpBaseData.OFFICETEL_FIELD)].SourceColumn = EmpBaseData.OFFICETEL_FIELD;
- param[paramChg(EmpBaseData.OFFICEFAX_FIELD)].SourceColumn = EmpBaseData.OFFICEFAX_FIELD;
- param[paramChg(EmpBaseData.MOBILE_FIELD)].SourceColumn = EmpBaseData.MOBILE_FIELD;
- param[paramChg(EmpBaseData.POSITION_FIELD)].SourceColumn = EmpBaseData.POSITION_FIELD;
- commandAdp.InsertCommand = command;
- int result = commandAdp.Update(empBaseData,EmpBaseData.EMP_TABLE_NAME);
- if(result>0)
- return (int)commandAdp.InsertCommand.Parameters["@Identify"].Value;
- else
- return 0;
- }
- public bool UpdateMrBaseInf(EmpBaseData empBaseData)
- {
- SqlCommand command = new SqlCommand();
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- command.CommandText = "UpdateMrBaseInf";
- SqlParameterCollection param = command.Parameters;
- param.Add(paramChg(DepData.DEPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.EMPNAME_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.LOGINID_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SEX_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.EMPCODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.EMAIL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.OFFICETEL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.OFFICEFAX_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.MOBILE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.POSITION_FIELD),SqlDbType.VarChar);
- param[paramChg(DepData.DEPID_FIELD)].SourceColumn = DepData.DEPID_FIELD;
- param[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- param[paramChg(EmpBaseData.EMPNAME_FIELD)].SourceColumn = EmpBaseData.EMPNAME_FIELD;
- param[paramChg(EmpBaseData.LOGINID_FIELD)].SourceColumn = EmpBaseData.LOGINID_FIELD;
- param[paramChg(EmpBaseData.SEX_FIELD)].SourceColumn = EmpBaseData.SEX_FIELD;
- param[paramChg(EmpBaseData.EMPCODE_FIELD)].SourceColumn = EmpBaseData.EMPCODE_FIELD;
- param[paramChg(EmpBaseData.EMAIL_FIELD)].SourceColumn = EmpBaseData.EMAIL_FIELD;
- param[paramChg(EmpBaseData.OFFICETEL_FIELD)].SourceColumn = EmpBaseData.OFFICETEL_FIELD;
- param[paramChg(EmpBaseData.OFFICEFAX_FIELD)].SourceColumn = EmpBaseData.OFFICEFAX_FIELD;
- param[paramChg(EmpBaseData.MOBILE_FIELD)].SourceColumn = EmpBaseData.MOBILE_FIELD;
- param[paramChg(EmpBaseData.POSITION_FIELD)].SourceColumn = EmpBaseData.POSITION_FIELD;
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empBaseData,EmpBaseData.EMP_TABLE_NAME);
- if(empBaseData.HasErrors)
- {
- empBaseData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empBaseData.AcceptChanges();
- return true;
- }
- }
- public bool UpdateEmpWelInf(EmpBaseData empData)
- {
- SqlCommand command = new SqlCommand();
-
- command.CommandText = "UpdateEmpWelInf";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameterCollection param = command.Parameters;
- param.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.ENTERDATE_FIELD),SqlDbType.DateTime);
- param.Add(paramChg(EmpBaseData.ENTERMODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.POSILEVL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SALALEVL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.ENDOFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.HOSPFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.HOUSFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.GRAVFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.UNEMFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.WELNOTE_FIELD),SqlDbType.Text);
- param[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- param[paramChg(EmpBaseData.ENTERDATE_FIELD)].SourceColumn = EmpBaseData.ENTERDATE_FIELD;
- param[paramChg(EmpBaseData.ENTERMODE_FIELD)].SourceColumn = EmpBaseData.ENTERMODE_FIELD;
- param[paramChg(EmpBaseData.POSILEVL_FIELD)].SourceColumn = EmpBaseData.POSILEVL_FIELD;
- param[paramChg(EmpBaseData.SALALEVL_FIELD)].SourceColumn = EmpBaseData.SALALEVL_FIELD;
- param[paramChg(EmpBaseData.ENDOFLAG_FIELD)].SourceColumn = EmpBaseData.ENDOFLAG_FIELD;
- param[paramChg(EmpBaseData.HOSPFLAG_FIELD)].SourceColumn = EmpBaseData.HOSPFLAG_FIELD;
- param[paramChg(EmpBaseData.HOUSFLAG_FIELD)].SourceColumn = EmpBaseData.HOUSFLAG_FIELD;
- param[paramChg(EmpBaseData.GRAVFLAG_FIELD)].SourceColumn = EmpBaseData.GRAVFLAG_FIELD;
- param[paramChg(EmpBaseData.UNEMFLAG_FIELD)].SourceColumn = EmpBaseData.UNEMFLAG_FIELD;
- param[paramChg(EmpBaseData.WELNOTE_FIELD)].SourceColumn = EmpBaseData.WELNOTE_FIELD;
-
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empData,EmpBaseData.EMP_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- public bool UpdateEmpPersInf(EmpBaseData empData)
- {
- SqlCommand command = new SqlCommand();
-
- command.CommandText = "UpdateEmpPersInf";
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameterCollection param = command.Parameters;
- param.Add(paramChg(EmpBaseData.EMPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.PROVINCE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.CITY_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.DISTRICT_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.STREET_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.POSTCODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.TEL1_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.TEL2_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.BIRTHDAY_FIELD),SqlDbType.DateTime);
- param.Add(paramChg(EmpBaseData.IDCARDNO_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.NAPLACE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.PARTY_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.PERSNOTE_FIELD),SqlDbType.Text);
- param[paramChg(EmpBaseData.EMPID_FIELD)].SourceColumn = EmpBaseData.EMPID_FIELD;
- param[paramChg(EmpBaseData.PROVINCE_FIELD)].SourceColumn = EmpBaseData.PROVINCE_FIELD;
- param[paramChg(EmpBaseData.CITY_FIELD)].SourceColumn = EmpBaseData.CITY_FIELD;
- param[paramChg(EmpBaseData.DISTRICT_FIELD)].SourceColumn = EmpBaseData.DISTRICT_FIELD;
- param[paramChg(EmpBaseData.STREET_FIELD)].SourceColumn = EmpBaseData.STREET_FIELD;
- param[paramChg(EmpBaseData.POSTCODE_FIELD)].SourceColumn = EmpBaseData.POSTCODE_FIELD;
- param[paramChg(EmpBaseData.TEL1_FIELD)].SourceColumn = EmpBaseData.TEL1_FIELD;
- param[paramChg(EmpBaseData.TEL2_FIELD)].SourceColumn = EmpBaseData.TEL2_FIELD;
- param[paramChg(EmpBaseData.BIRTHDAY_FIELD)].SourceColumn = EmpBaseData.BIRTHDAY_FIELD;
- param[paramChg(EmpBaseData.IDCARDNO_FIELD)].SourceColumn = EmpBaseData.IDCARDNO_FIELD;
- param[paramChg(EmpBaseData.NAPLACE_FIELD)].SourceColumn = EmpBaseData.NAPLACE_FIELD;
- param[paramChg(EmpBaseData.PARTY_FIELD)].SourceColumn = EmpBaseData.PARTY_FIELD;
- param[paramChg(EmpBaseData.PERSNOTE_FIELD)].SourceColumn = EmpBaseData.PERSNOTE_FIELD;
- commandAdp.UpdateCommand = command;
- commandAdp.Update(empData,EmpBaseData.EMP_TABLE_NAME);
- if(empData.HasErrors)
- {
- empData.Tables[EmpBaseData.EMP_TABLE_NAME].GetErrors()[0].ClearErrors();
- return false;
- }
- else
- {
- empData.AcceptChanges();
- return true;
- }
- }
- private SqlCommand GetCommand()
- {
- SqlCommand command = new SqlCommand();
- command.CommandType = CommandType.StoredProcedure;
- command.Connection = con;
- SqlParameterCollection param = command.Parameters;
- SqlParameter paramTmp = new SqlParameter("@Identify",SqlDbType.Int);
- paramTmp.Direction = ParameterDirection.ReturnValue;
- param.Add(paramTmp);
- param.Add(paramChg(DepData.DEPID_FIELD),SqlDbType.Int);
- param.Add(paramChg(DepData.BRANCHID_FIELD),SqlDbType.Int);
- param.Add(paramChg(EmpBaseData.EMPNAME_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.LOGINID_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SEX_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.EMPCODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.EMAIL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.OFFICETEL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.OFFICEFAX_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.MOBILE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.PROVINCE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.CITY_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.DISTRICT_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.STREET_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.POSTCODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.TEL1_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.TEL2_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.BIRTHDAY_FIELD),SqlDbType.DateTime);
- param.Add(paramChg(EmpBaseData.IDCARDNO_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.NAPLACE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.PARTY_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.EDUCAT1_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SCHOOL1_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SPECIAL1_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.GERTIME1_FIELD),SqlDbType.DateTime);
- param.Add(paramChg(EmpBaseData.EDUCAT2_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SCHOOL2_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SPECIAL2_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.GERTIME2_FIELD),SqlDbType.DateTime);
- param.Add(paramChg(EmpBaseData.QULI1_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.QULI2_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.QULI3_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.QULI4_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.ENTERDATE_FIELD),SqlDbType.DateTime);
- param.Add(paramChg(EmpBaseData.ENTERMODE_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.POSILEVL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.SALALEVL_FIELD),SqlDbType.VarChar);
- param.Add(paramChg(EmpBaseData.ENDOFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.HOSPFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.HOUSFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.GRAVFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.UNEMFLAG_FIELD),SqlDbType.Bit);
- param.Add(paramChg(EmpBaseData.WELNOTE_FIELD),SqlDbType.Text);
- param.Add(paramChg(EmpBaseData.PERSNOTE_FIELD),SqlDbType.Text);
- param[paramChg(DepData.DEPID_FIELD)].SourceColumn = DepData.DEPID_FIELD;
- param[paramChg(DepData.BRANCHID_FIELD)].SourceColumn = DepData.BRANCHID_FIELD;
- param[paramChg(EmpBaseData.EMPNAME_FIELD)].SourceColumn = EmpBaseData.EMPNAME_FIELD;
- param[paramChg(EmpBaseData.LOGINID_FIELD)].SourceColumn = EmpBaseData.LOGINID_FIELD;
- param[paramChg(EmpBaseData.SEX_FIELD)].SourceColumn = EmpBaseData.SEX_FIELD;
- param[paramChg(EmpBaseData.EMPCODE_FIELD)].SourceColumn = EmpBaseData.EMPCODE_FIELD;
- param[paramChg(EmpBaseData.EMAIL_FIELD)].SourceColumn = EmpBaseData.EMAIL_FIELD;
- param[paramChg(EmpBaseData.OFFICETEL_FIELD)].SourceColumn = EmpBaseData.OFFICETEL_FIELD;
- param[paramChg(EmpBaseData.OFFICEFAX_FIELD)].SourceColumn = EmpBaseData.OFFICEFAX_FIELD;
- param[paramChg(EmpBaseData.MOBILE_FIELD)].SourceColumn = EmpBaseData.MOBILE_FIELD;
- param[paramChg(EmpBaseData.PROVINCE_FIELD)].SourceColumn = EmpBaseData.PROVINCE_FIELD;
- param[paramChg(EmpBaseData.CITY_FIELD)].SourceColumn = EmpBaseData.CITY_FIELD;
- param[paramChg(EmpBaseData.DISTRICT_FIELD)].SourceColumn = EmpBaseData.DISTRICT_FIELD;
- param[paramChg(EmpBaseData.STREET_FIELD)].SourceColumn = EmpBaseData.STREET_FIELD;
- param[paramChg(EmpBaseData.POSTCODE_FIELD)].SourceColumn = EmpBaseData.POSTCODE_FIELD;
- param[paramChg(EmpBaseData.TEL1_FIELD)].SourceColumn = EmpBaseData.TEL1_FIELD;
- param[paramChg(EmpBaseData.TEL2_FIELD)].SourceColumn = EmpBaseData.TEL2_FIELD;
- param[paramChg(EmpBaseData.BIRTHDAY_FIELD)].SourceColumn = EmpBaseData.BIRTHDAY_FIELD;
- param[paramChg(EmpBaseData.IDCARDNO_FIELD)].SourceColumn = EmpBaseData.IDCARDNO_FIELD;
- param[paramChg(EmpBaseData.NAPLACE_FIELD)].SourceColumn = EmpBaseData.NAPLACE_FIELD;
- param[paramChg(EmpBaseData.PARTY_FIELD)].SourceColumn = EmpBaseData.PARTY_FIELD;
- param[paramChg(EmpBaseData.EDUCAT1_FIELD)].SourceColumn = EmpBaseData.EDUCAT1_FIELD;
- param[paramChg(EmpBaseData.SCHOOL1_FIELD)].SourceColumn = EmpBaseData.SCHOOL1_FIELD;
- param[paramChg(EmpBaseData.SPECIAL1_FIELD)].SourceColumn = EmpBaseData.SPECIAL1_FIELD;
- param[paramChg(EmpBaseData.GERTIME1_FIELD)].SourceColumn = EmpBaseData.GERTIME1_FIELD;
- param[paramChg(EmpBaseData.EDUCAT2_FIELD)].SourceColumn = EmpBaseData.EDUCAT2_FIELD;
- param[paramChg(EmpBaseData.SCHOOL2_FIELD)].SourceColumn = EmpBaseData.SCHOOL2_FIELD;
- param[paramChg(EmpBaseData.SPECIAL2_FIELD)].SourceColumn = EmpBaseData.SPECIAL2_FIELD;
- param[paramChg(EmpBaseData.GERTIME2_FIELD)].SourceColumn = EmpBaseData.GERTIME2_FIELD;
- param[paramChg(EmpBaseData.QULI1_FIELD)].SourceColumn = EmpBaseData.QULI1_FIELD;
- param[paramChg(EmpBaseData.QULI2_FIELD)].SourceColumn = EmpBaseData.QULI2_FIELD;
- param[paramChg(EmpBaseData.QULI3_FIELD)].SourceColumn = EmpBaseData.QULI3_FIELD;
- param[paramChg(EmpBaseData.QULI4_FIELD)].SourceColumn = EmpBaseData.QULI4_FIELD;
- param[paramChg(EmpBaseData.ENTERDATE_FIELD)].SourceColumn = EmpBaseData.ENTERDATE_FIELD;
- param[paramChg(EmpBaseData.ENTERMODE_FIELD)].SourceColumn = EmpBaseData.ENTERMODE_FIELD;
- param[paramChg(EmpBaseData.POSILEVL_FIELD)].SourceColumn = EmpBaseData.POSILEVL_FIELD;
- param[paramChg(EmpBaseData.SALALEVL_FIELD)].SourceColumn = EmpBaseData.SALALEVL_FIELD;
- param[paramChg(EmpBaseData.ENDOFLAG_FIELD)].SourceColumn = EmpBaseData.ENDOFLAG_FIELD;
- param[paramChg(EmpBaseData.HOSPFLAG_FIELD)].SourceColumn = EmpBaseData.HOSPFLAG_FIELD;
- param[paramChg(EmpBaseData.HOUSFLAG_FIELD)].SourceColumn = EmpBaseData.HOUSFLAG_FIELD;
- param[paramChg(EmpBaseData.GRAVFLAG_FIELD)].SourceColumn = EmpBaseData.GRAVFLAG_FIELD;
- param[paramChg(EmpBaseData.UNEMFLAG_FIELD)].SourceColumn = EmpBaseData.UNEMFLAG_FIELD;
- param[paramChg(EmpBaseData.WELNOTE_FIELD)].SourceColumn = EmpBaseData.WELNOTE_FIELD;
- param[paramChg(EmpBaseData.PERSNOTE_FIELD)].SourceColumn = EmpBaseData.PERSNOTE_FIELD;
- return command;
- }
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(true);
- }
- protected virtual void Dispose(bool disposing)
- {
-
- }
- public MrBaseInf()
- {
- conStr = System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString");
- con = new SqlConnection(conStr);
- commandAdp = new SqlDataAdapter();
- }
- }
- }