コード例 #1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Account GetModel_StudentID(int StudentID)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:Ticket.Account.GetModel_StudentID");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@StudentID", StudentID));
            var model = new Account();
            var ds    = Query(strSql.ToString(), parameters.ToArray());

            return(ModelConvert.ToModel <Account>(ds));
        }
コード例 #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ProcessDefinition GetModel(int DefinitionID)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:Process.ProcessDefinition.GetModel");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@DefinitionID", DefinitionID));

            var model = new ProcessDefinition();
            var ds    = Query(strSql.ToString(), parameters.ToArray());

            return(ModelConvert.ToModel <ProcessDefinition>(ds));
        }
コード例 #3
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TicketRule GetModel(int TicketRuleID)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:Ticket.TicketRule.GetModel");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@TicketRuleID", TicketRuleID));

            var model = new TicketRule();
            var ds    = Query(strSql.ToString(), parameters.ToArray());

            return(ModelConvert.ToModel <TicketRule>(ds));
        }
コード例 #4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TicketEq GetModel(string SN)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:Ticket.TicketEq.GetModel");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@SN", SN));

            var model = new TicketEq();
            var ds    = Query(strSql.ToString(), parameters.ToArray());

            return(ModelConvert.ToModel <TicketEq>(ds));
        }
コード例 #5
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ApplyAssessment GetModel(int ApplyAssessmentID)
        {
            var strSql = new StringBuilder();

            strSql.Append(@"REPOS:ApplyAssessment.ApplyAssessment.GetModel");
            var parameters = new List <QfParameter>();

            parameters.Add(new QfParameter("@ApplyAssessmentID", ApplyAssessmentID));

            var model = new ApplyAssessment();
            var ds    = Query(strSql.ToString(), parameters.ToArray());

            return(ModelConvert.ToModel <ApplyAssessment>(ds));
        }
コード例 #6
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="sql"></param>
 public CarDispatch GetModel(int DispatchID)
 {
     try
     {
         string      sql   = string.Format("select * from t_car_dispatch where DispatchID = {0} limit 1", DispatchID);
         DataTable   dt    = MysqlHelper.ExecuteDataTable(sql);
         CarDispatch model = ModelConvert.ToModel <CarDispatch>(dt);
         return(model);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(null);
     }
 }
コード例 #7
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="sql"></param>
 public CarriageReturn GetModel(int ReturnID)
 {
     try
     {
         string         sql   = string.Format("select * from t_carriage_return where ReturnID = {0} limit 1", ReturnID);
         DataTable      dt    = MysqlHelper.ExecuteDataTable(sql);
         CarriageReturn model = ModelConvert.ToModel <CarriageReturn>(dt);
         return(model);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(null);
     }
 }
コード例 #8
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="sql"></param>
 public Employee GetModel(int EmployeeID)
 {
     try
     {
         string    sql   = string.Format("select * from t_employee where EmployeeID = {0} limit 1", EmployeeID);
         DataTable dt    = MysqlHelper.ExecuteDataTable(sql);
         Employee  model = ModelConvert.ToModel <Employee>(dt);
         return(model);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(null);
     }
 }
コード例 #9
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="sql"></param>
 public CarApplySocialpeople GetModel(int SocialPeopleID)
 {
     try
     {
         string               sql   = string.Format("select * from t_car_apply_socialpeople where SocialPeopleID = {0} limit 1", SocialPeopleID);
         DataTable            dt    = MysqlHelper.ExecuteDataTable(sql);
         CarApplySocialpeople model = ModelConvert.ToModel <CarApplySocialpeople>(dt);
         return(model);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(null);
     }
 }
コード例 #10
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="sql"></param>
 public Duty GetModel(int DutyID)
 {
     try
     {
         string    sql   = string.Format("select * from t_duty where DutyID = {0} limit 1", DutyID);
         DataTable dt    = MysqlHelper.ExecuteDataTable(sql);
         Duty      model = ModelConvert.ToModel <Duty>(dt);
         return(model);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(null);
     }
 }
コード例 #11
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 /// <param name="sql"></param>
 public CarRepairItem GetModel(int ItemID)
 {
     try
     {
         string        sql   = string.Format("select * from t_car_repair_item where ItemID = {0} limit 1", ItemID);
         DataTable     dt    = MysqlHelper.ExecuteDataTable(sql);
         CarRepairItem model = ModelConvert.ToModel <CarRepairItem>(dt);
         return(model);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(null);
     }
 }