/// <summary> /// µÃµ½ËùÓдýÉóºËµÄÇë¼Ùµ¥ /// </summary> /// <returns></returns> public List <OutApplication> GetNeedConfirmOutApplication() { List <OutApplication> iRet = new List <OutApplication>(); SqlCommand cmd = new SqlCommand(); using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetNeedConfirmOutApplication", cmd)) { while (sdr.Read()) { Account account = new Account(); account.Id = Convert.ToInt32(sdr[_DbAccountID]); OutApplication application = new OutApplication(Convert.ToInt32(sdr[_DbPKID]), account, Convert.ToDateTime(sdr[_DbSubmitDate]), sdr[_DbReason].ToString(), Convert.ToDateTime(sdr[_DbFrom]), Convert.ToDateTime(sdr[_DbTo]), Convert.ToDecimal(sdr[_DbCostTime]), GetOutApplicationItemByOutApplicationID(Convert.ToInt32(sdr[_DbPKID])), sdr[_DbOutLocation].ToString(), OutType.GetOutTypeByID(Convert.ToInt32(sdr[_DbOutType]))); application.DiyProcess = RequestUtility.GetDiyProcess(sdr[_DbDiyProcess].ToString()); iRet.Add(application); } return(iRet); } }
/// <summary> /// </summary> public OverWork GetOverWorkByOverWorkID(int pKID) { OverWork overwork = null; SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_PKID, SqlDbType.Int).Value = pKID; using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetOverWorkByOverWorkID", cmd)) { while (sdr.Read()) { List <OverWorkItem> overWorkItem = GetOverWorkItemByOverWorkID(Convert.ToInt32(sdr[_DbPKID])); Account account = new Account(); account.Id = Convert.ToInt32(sdr[_DbAccountID]); overwork = new OverWork(pKID, account, Convert.ToDateTime(sdr[_DbSubmitDate]), sdr[_DbReason].ToString(), Convert.ToDateTime(sdr[_DbFrom]), Convert.ToDateTime(sdr[_DbTo]), Convert.ToDecimal(sdr[_DbCostTime]), overWorkItem, sdr[_DbProjectName].ToString()); overwork.DiyProcess = RequestUtility.GetDiyProcess(sdr[_DbDiyProcess].ToString()); break; } } return(overwork); }
/// <summary> /// /// </summary> public OutApplication GetOutApplicationByOutApplicationID(int pKID) { OutApplication application = null; SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_PKID, SqlDbType.Int).Value = pKID; using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetOutApplicationByOutApplicationID", cmd)) { while (sdr.Read()) { List <OutApplicationItem> applicationItem = GetOutApplicationItemByOutApplicationID(Convert.ToInt32(sdr[_DbPKID])); Account account = new Account(); account.Id = Convert.ToInt32(sdr[_DbAccountID]); application = new OutApplication(pKID, account, Convert.ToDateTime(sdr[_DbSubmitDate]), sdr[_DbReason].ToString(), Convert.ToDateTime(sdr[_DbFrom]), Convert.ToDateTime(sdr[_DbTo]), Convert.ToDecimal(sdr[_DbCostTime]), applicationItem, sdr[_DbOutLocation].ToString(), OutType.GetOutTypeByID(Convert.ToInt32(sdr[_DbOutType]))); application.DiyProcess = RequestUtility.GetDiyProcess(sdr[_DbDiyProcess].ToString()); break; } } return(application); }
/// <summary> /// </summary> public List <OverWork> GetNeedConfirmOverWork() { List <OverWork> iRet = new List <OverWork>(); SqlCommand cmd = new SqlCommand(); using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetNeedConfirmOverWork", cmd)) { while (sdr.Read()) { Account account = new Account(); account.Id = Convert.ToInt32(sdr[_DbAccountID]); OverWork overWork = new OverWork(Convert.ToInt32(sdr[_DbPKID]), account, Convert.ToDateTime(sdr[_DbSubmitDate]), sdr[_DbReason].ToString(), Convert.ToDateTime(sdr[_DbFrom]), Convert.ToDateTime(sdr[_DbTo]), Convert.ToDecimal(sdr[_DbCostTime]), GetOverWorkItemByOverWorkID(Convert.ToInt32(sdr[_DbPKID])), sdr[_DbProjectName].ToString()); overWork.DiyProcess = RequestUtility.GetDiyProcess(sdr[_DbDiyProcess].ToString()); iRet.Add(overWork); } return(iRet); } }