コード例 #1
0
ファイル: StudentBrowser.cs プロジェクト: radtek/fivemen
        private void Print(Keys key)
        {
            bool result = this.ValidateChildren(ValidationConstraints.Enabled);

            //MessageBoxHelper.Show("validate result is:"+result);
            if (result)
            {
                this.ClearValidateError();
                if (this.Save())
                {
                    log.Debug("保存并套打第一步保存成功!");
                    StudentHelper.Print(this.entity as StudentInfo, key);
                }
            }
            else
            {
                MessageBoxHelper.Show("输入有误,请检查!");
                return;
            }
            //this.Save();
        }
コード例 #2
0
ファイル: OtherPrinterForm.cs プロジェクト: radtek/fivemen
        private void button2_Click(object sender, EventArgs e)
        {
            string idcard = this.txtIdCard.Text.Trim();

            if (idcard.Length == 15)
            {
                idcard = FT.Commons.Tools.IDCardHelper.IdCard15To18(idcard);
                this.txtIdCard.Text = idcard;
            }
            ArrayList lists = FT.DAL.Orm.SimpleOrmOperator.QueryConditionList <StudentInfo>(" where c_idcard='" +
                                                                                            FT.DAL.DALSecurityTool.TransferInsertField(idcard) + "' order by date_baoming desc");

            if (lists != null && lists.Count > 0)
            {
                StudentInfo info = lists[0] as StudentInfo;
                StudentHelper.Print(info, key);
            }
            else
            {
                FT.Commons.Tools.MessageBoxHelper.Show("没有找到身份证明号码为" + idcard + "的学员!");
            }
        }