Esempio n. 1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            JARefer tmpRefer = new JARefer();

            tmpRefer.GetData(_Refer_Code);
            JAExternalRefer tmp = new JAExternalRefer();

            tmp.ConfirmReceiver        = false;
            tmp.Send_Type              = Convert.ToInt32(cmbSendTypeExternal.SelectedValue);
            tmp.Refer_Code             = _Refer_Code;
            tmp.receiver_external_code = tmpRefer.receiver_External_code;
            tmp.receiver_full_title    = tmpRefer.receiver_full_title;
            tmp.Description            = txtDesc.Text;
            if (tmp.Insert() > 0)
            {
                JMessages.Message("Register Successfully ", "Register", JMessageType.Information);
            }
            else
            {
                JMessages.Message("Register Not Successfully ", "Register", JMessageType.Information);
            }
        }
Esempio n. 2
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            JAExternalRefer tmp = new JAExternalRefer();

            if (dgRefer.SelectedRow != null)
            {
                tmp.GetData(Convert.ToInt32(dgRefer.SelectedRow.Cells["Code"].ToString()));
                tmp.Send_Date       = JMainFrame.GlobalDataBase.GetCurrentDateTime();
                tmp.ConfirmReceiver = true;
                if (tmp.Update())
                {
                    JMessages.Message("Update Successfully ", "Update", JMessageType.Information);
                }
                else
                {
                    JMessages.Message("Update Not Successfully ", "Update", JMessageType.Information);
                }
            }
            else
            {
                JMessages.Message("Please Selected Row ", "Selected", JMessageType.Information);
            }
        }
Esempio n. 3
0
        private DataTable Search()
        {
            string Expression = "";

            if (!String.IsNullOrEmpty(txtReceiver.Text))
            {
                Expression = " And " + ExternalRefer.receiver_external_code + " Like '%" + txtReceiver.Text + "%'";
                JAExternalRefer tmp = new JAExternalRefer();
                if (ckSent.Checked)
                {
                    Expression = Expression + " And " + ExternalRefer.ConfirmReceiver + "= True ";
                }
                else
                {
                    Expression = Expression + " And " + ExternalRefer.ConfirmReceiver + "= False ";
                }
                return(tmp.GetList(Expression));
            }
            else
            {
                return(null);
            }
        }