Exemplo n.º 1
0
        /// <summary>
        /// 学员信息和预约单绑定
        /// </summary>
        /// <param name="studi"></param>
        /// <param name="apid"></param>
        public static void BindStudentforAP(string studi, string apid)
        {
            Appointment ap = AppointmentData.GetOneByID(apid);

            ap.ApStudentID = studi;
            MsSqlMapperHepler.Update <Appointment>(ap, DBKeys.PRX);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateSYS_Account(SYSAccount sys)
        {
            SYSAccount sysa = Accounts_UpdateData.GetSYS_AccountByID(sys.ACC_Id); //获取对象

            Cloner <SYSAccount, SYSAccount> .CopyTo(sys, sysa);                   //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(sysa, DBKeys.PRX));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateMessage(Message Mes)
        {
            Message Stuto = MessageData.GetMessageByID(Mes.ID); //获取对象

            Cloner <Message, Message> .CopyTo(Mes, Stuto);      //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Stuto, DBKeys.PRX));
        }
Exemplo n.º 4
0
        public static bool updateCourse(Course course)
        {
            Course to = CourseData.getCourseById(course.ID);

            Cloner <Course, Course> .CopyTo(course, to);

            return(MsSqlMapperHepler.Update(to, DBKeys.PRX));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateStudent(Students Stu)
        {
            Students Stuto = StudentData.GetStudentsByID(Stu.ID); //获取对象

            Cloner <Students, Students> .CopyTo(Stu, Stuto);      //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Stuto, DBKeys.PRX));
        }
Exemplo n.º 6
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateDiscount(Discount Dis)
        {
            Discount Stuto = DiscountData.GetDiscountByID(Dis.ID); //获取对象

            Cloner <Discount, Discount> .CopyTo(Dis, Stuto);       //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Stuto, DBKeys.PRX));
        }
Exemplo n.º 7
0
        /// <summary>
        /// 保存班级信息
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool Update(Classes Stu)
        {
            Classes Stuto = ClassesData.GetClassesByID(Stu.ID); //获取对象

            Cloner <Classes, Classes> .CopyTo(Stu, Stuto);      //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Stuto, DBKeys.PRX));
        }
Exemplo n.º 8
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateButton(SYSButton btn)
        {
            SYSButton btnto = ButtonData.GetButtonByID(btn.BTN_Id); //获取对象

            Cloner <SYSButton, SYSButton> .CopyTo(btn, btnto);      //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(btnto, DBKeys.PRX));
        }
Exemplo n.º 9
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateReimburse(Reimburse Rb)
        {
            Reimburse Rbs = ReimburseData.GetReimburseByID(Rb.ID); //获取对象

            Cloner <Reimburse, Reimburse> .CopyTo(Rb, Rbs);        //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Rbs, DBKeys.PRX));
        }
Exemplo n.º 10
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateRefund(Refund re)
        {
            Refund Ref = RefundInfoData.GetRefundByID(re.ID); //获取对象

            Cloner <Refund, Refund> .CopyTo(re, Ref);         //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Ref, DBKeys.PRX));
        }
Exemplo n.º 11
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateAttendanceRecord(AttendanceRecord att)
        {
            AttendanceRecord Stuto = StudentScheduleListData.GetAttendanceRecordByID(att.ID); //获取对象

            Cloner <AttendanceRecord, AttendanceRecord> .CopyTo(att, Stuto);                  //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Stuto, DBKeys.PRX));
        }
Exemplo n.º 12
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool UpdateTransfer(Transfer Rb)
        {
            Transfer Rbs = TransferData.GetTransferByID(Rb.ID); //获取对象

            Cloner <Transfer, Transfer> .CopyTo(Rb, Rbs);       //代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(Rbs, DBKeys.PRX));
        }
Exemplo n.º 13
0
        /// <summary>
        /// 修改预约记录
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static bool Update(Appointment obj)
        {
            Appointment objTo = AppointmentData.GetOneByID(obj.ID);//获取对象

            obj.CreateTime = objTo.CreateTime;
            obj.ApStateID  = objTo.ApStateID;
            Cloner <Appointment, Appointment> .CopyTo(obj, objTo);//代码克隆,把前台或者的值也就是变更内容复制到目标对象,不做变更的数据不变

            return(MsSqlMapperHepler.Update(objTo, DBKeys.PRX));
        }
Exemplo n.º 14
0
        /// <summary>
        /// 停课一周
        /// </summary>
        /// <param name="classid"></param>
        /// <param name="classindex"></param>
        /// <returns></returns>
        public static DateTime StopClass(string classid, int classindex)
        {
            string    strsql1       = "select max(ClassDate) from [ClassList] where [ClassID] = '" + classid + "'";
            DateTime  lastClassTime = MsSqlMapperHepler.SqlWithParamsSingle <DateTime>(strsql1, null, DBKeys.PRX);//获取最后一次课的时间
            ClassList cl            = GetOneByid(classid, classindex);

            cl.ClassDate = lastClassTime.AddDays(7);//延后一周
            MsSqlMapperHepler.Update(cl, DBKeys.PRX);

            return(cl.ClassDate);
        }
Exemplo n.º 15
0
        /// <summary>
        /// 更新 Enroll信息
        /// </summary>
        /// <param name="btn"></param>
        /// <returns></returns>
        public static bool Update(Enroll obj)
        {
            bool ret = false;

            try
            {
                MsSqlMapperHepler.Update <Enroll>(obj, DBKeys.PRX);
                ret = true;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(ret);
        }
Exemplo n.º 16
0
        /// <summary>
        /// 新增跟进记录
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static bool AddFollow(FollowRecord obj)
        {
            bool ret = false;

            try
            {
                MsSqlMapperHepler.Insert <FollowRecord>(obj, DBKeys.PRX);
                Appointment ap = GetOneByID(obj.APID);
                if (ap.ApStateID == 1)//如果之前是未跟进则改成已跟进
                {
                    ap.ApStateID = 2;
                }
                MsSqlMapperHepler.Update <Appointment>(ap, DBKeys.PRX);
                ret = true;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(ret);
        }