Example #1
0
        private bool ReadInput()
        {
            if (cmbDocType.SelectedIndex == -1)
            {
                cmbDocType.Style = MetroFramework.MetroColorStyle.Red;
                MessageBox.Show("الرجاء اختيار نوع الوثيقة ");

                return(false);
            }


            if (String.IsNullOrEmpty(txtDocName.Text))
            {
                MessageBox.Show("الرجاء ادخال اسم الوثيقة ");
                return(false);
            }


            if (String.IsNullOrEmpty(txtDocNo.Text) || int.Parse(txtDocNo.Text) == 0)
            {
                MessageBox.Show("الرجاء ادخال رقم الوثيقة ");
                return(false);
            }

            if (cmbDocType.SelectedIndex != -1)
            {
                Cv_Document.Record["DocTypeId"] = cmbDocType.SelectedValue;
            }
            else
            {
                Cv_Document.Record["DocTypeId"] = DBNull.Value;
            }

            Cv_Document.Record["DocName"] = txtDocName.Text;
            Cv_Document.Record["DocNo"]   = txtDocNo.Text;


            Cv_Document.Record["IssueDate"]  = Cv_Session.GetDateFormatDMY(dtIssueDate.Value);
            Cv_Document.Record["ExpireDate"] = Cv_Session.GetDateFormatDMY(dtDateExpire.Value);

            Cv_Document.Record["Tags"]    = txtTags.Text;
            Cv_Document.Record["Detials"] = txtDetails.Text;

            Cv_Document.Record["Tags"]    = txtTags.Text;
            Cv_Document.Record["Detials"] = txtDetails.Text;


            Cv_Document.Record["DocAlertBefore"]   = txtDayNo.Text;
            Cv_Document.Record["DocRenewComplate"] = tchkRenew.Checked;

            return(true);
        }