protected void btnSave_Click(object sender, EventArgs e)
        {
            if (this.txtName.Text.Trim().Length == 0 || this.txtName.Text.Trim() == "")
            {
                AlertError("输入的名字不能为空!");
            }
            else if (!IsNumber(this.txtPhone.Text) || this.txtPhone.Text.Length != 11)
            {
                AlertError("输入的手机号只能是11位数字!");
            }
            else if (this.txtIdcard.Text.Length != 18)
            {
                AlertError("请输入正确的18位身份证号");
            }
            else
            {
                Oos.Numeral.Model.Numeral_Appointment model = BllNumApp.GetModel(GetQueryOrForms("ID"));
                if (model != null)
                {
                    model.AppointmentName = this.txtName.Text;
                    model.AppointmentTel  = this.txtPhone.Text;
                    model.AppointmentCard = this.txtIdcard.Text;
                    BllNumApp.Update(model);
                }
                // Alert("身份信息变更成功!");
                string pringTxt = Selectprint(model.Reserved2);
                pringTxt = pringTxt.Replace("[预约人]", this.txtName.Text.Trim()).Replace("[预约码]", model.AppointmentVerification).Replace("[手机号]", this.txtPhone.Text).Replace("[身份证号]", this.txtIdcard.Text)
                           .Replace("[预约开始时间]", model.AppointmentStatTime.ToString("yyyy-MM-dd HH:mm:00")).Replace("[预约结束时间]", model.AppointmentEndTime.ToString("yyyy-MM-dd HH:mm:00"))
                           .Replace("[暗记]", Memorization(model.CreateDate, this.txtIdcard.Text)).Replace("[申请时间]", model.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")).Replace("[预约业务]", model.AppointmentAppProject);



                AlertAndClose("身份信息变更成功!", ToBase64(pringTxt));
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Oos.Numeral.Model.Numeral_Appointment model = BllNumApp.GetModel(GetQueryOrForms("ID"));
         if (model != null)
         {
             this.txtName.Text   = model.AppointmentName;
             this.txtPhone.Text  = model.AppointmentTel;
             this.txtIdcard.Text = model.AppointmentCard;
         }
     }
 }
Exemple #3
0
        public string AddNumeralAt(string OrganId, string AppProjectId, string AppointmentDeptName, string AppointmentName, string AppointmentTel, string AppointmentCard, DateTime AppointmentStatTime, DateTime AppointmentEndTime, int AppointmentType, DateTime time)
        {
            //OrganId = "131|00000000000000000000000000000000";
            string results = "";

            // DateTime newTime = DateTime.Now;
            Oos.Numeral.Bll.AppProject          BAppProject          = new Oos.Numeral.Bll.AppProject();
            Oos.Numeral.Bll.Numeral_Appointment BNumeral_Appointment = new Oos.Numeral.Bll.Numeral_Appointment();

            List <Oos.Numeral.Model.AppProject> aptList = BAppProject.GetAppProjectCodeIDList(OrganId, AppProjectId);

            if (aptList != null & aptList.Count > 0)
            {
                Random ro = new Random();
                int    i  = ro.Next(100000, 1000000);
                while (BNumeral_Appointment.GetVER(i.ToString(), OrganId, DateTime.Now))
                {
                    i = ro.Next(100000, 1000000);
                }
                Oos.Numeral.Model.Numeral_Appointment model = new Oos.Numeral.Model.Numeral_Appointment();
                model.ID = System.Guid.NewGuid().ToString();
                model.AppointmentAppProject   = aptList[0].AppProjectName;
                model.AppointmentCard         = AppointmentCard;
                model.AppointmentDeptId       = aptList[0].AppObjectOrganCodeID;
                model.AppointmentDeptName     = AppointmentDeptName;
                model.AppointmentEndTime      = AppointmentEndTime;
                model.AppointmentName         = AppointmentName;
                model.AppointmentStatTime     = AppointmentStatTime;
                model.AppointmentTel          = AppointmentTel;
                model.AppointmentType         = AppointmentType;
                model.AppointmentVerification = i.ToString();
                model.CreateDate = time;
                model.IsTake     = 0;
                model.OrganId    = OrganId;
                model.Remark     = "";
                model.Reserved1  = "";
                model.Reserved2  = aptList[0].AppProjectCodeID;
                model.Reserved3  = "";
                model.Reserved4  = "";
                model.Reserved5  = "";
                model.IsApproved = 1;
                if (BNumeral_Appointment.Add(model))
                {
                    results = i.ToString();
                }
            }
            return(results);
        }
Exemple #4
0
        public void undo()
        {
            string str = "0";

            Oos.Numeral.Bll.Numeral_Appointment   detTimeBll = new Oos.Numeral.Bll.Numeral_Appointment();
            Oos.Numeral.Model.Numeral_Appointment detModel   = detTimeBll.GetModel(GetQueryOrForms("KeyValue"));
            if (detModel != null)
            {
                detModel.IsTake = 2;
                if (detTimeBll.Update(detModel))
                {
                    str = "y";
                }
            }
            Response.Write(str);
            Response.End();
        }