Exemplo n.º 1
0
        private void LoadData()
        {
            if (_Code == 0)
            {
                txtIssuDate.Date     = (new JDataBase()).GetCurrentDateTime();
                grdReport.DataSource = JAUTDocumentDetails.GetBusCredit();

                grdReport.gridEX1.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.True;
                grdReport.gridEX1.CurrentTable.Columns["AccountNo"].EditType  = Janus.Windows.GridEX.EditType.NoEdit;
                grdReport.gridEX1.CurrentTable.Columns["OwnerPCode"].EditType = Janus.Windows.GridEX.EditType.NoEdit;
                grdReport.gridEX1.CurrentTable.Columns["BusCode"].EditType    = Janus.Windows.GridEX.EditType.NoEdit;
                grdReport.gridEX1.CurrentTable.Columns["BusNumber"].EditType  = Janus.Windows.GridEX.EditType.NoEdit;
                grdReport.gridEX1.CurrentTable.Columns["OwnerName"].EditType  = Janus.Windows.GridEX.EditType.NoEdit;
                grdReport.gridEX1.CurrentTable.Columns["TotalPrice"].EditType = Janus.Windows.GridEX.EditType.NoEdit;
            }
            else
            {
                JAUTPayment payment = new JAUTPayment(null, _Code);
                txtDesc.Text                = payment.Description;
                txtIssuDate.Date            = payment.PaymentDate;
                grdReport.DataSource        = JAUTPaymentDetails.GetData(_Code);
                grdReport.gridEX1.AllowEdit = Janus.Windows.GridEX.InheritableBoolean.False;
                DisableAll();
            }
            CalcSum();
        }
Exemplo n.º 2
0
        public bool CascadeDelete(JDataBase db)
        {
            JAUTDocumentTable AT = new JAUTDocumentTable();

            AT.SetValueProperty(this);
            if (JAUTDocumentDetails.Delete(db, this.Code))
            {
                if (AT.Delete(db))
                {
                    ClassLibrary.JHistory jHistory = new ClassLibrary.JHistory();
                    jHistory.Save("BusManagment.JAUTDocument", AT.Code, 0, 0, 0, "حذف سند و جزئیات", "", 0);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        private void LoadData()
        {
            if (_Code == 0)
            {
                txtIssuDate.Date = (new JDataBase()).GetCurrentDateTime();
            }
            else
            {
                DisableAll();
                JAUTDocument document = new JAUTDocument(null, _Code);
                txtDesc.Text       = document.Description;
                chAllDates.Checked = document.AllDates;
                txtIssuDate.Date   = document.IssueDate;

                DataTable dates = JAUTDocumentDates.GetData(_Code);
                foreach (DataRow row  in dates.Rows)
                {
                    JAUTDocumentDate date = new JAUTDocumentDate(Convert.ToInt32(row["Code"]));
                    chListDates.Items.Add(date);
                }
                DataTable details = JAUTDocumentDetails.GetData(_Code);
                grdReport.DataSource = details;
            }
        }