Exemplo n.º 1
0
        public ChequeReplyEntity get(string cond)
        {
            ChequeReplyEntity entity = new ChequeReplyEntity();

            provider.loadToDataSet(entity, cond);
            return(entity);
        }
Exemplo n.º 2
0
        public int delete(int id)
        {
            AbstractCommonData entity   = new ChequeReplyEntity();
            string             delQuery = "DELETE FROM " + entity.TableName + " where " + entity.IndexFieldName + "=" + provider.getSQLString(id);

            return(provider.delete(delQuery));
        }
Exemplo n.º 3
0
        public ChequeReplyEntity get(int id)
        {
            ChequeReplyEntity entity = new ChequeReplyEntity();
            string            cond   = ChequeReplyEntity.FIELD_ID + "=" + provider.getSQLString(id);

            provider.loadToDataSet(entity, cond);
            return(entity);
        }
Exemplo n.º 4
0
        public ChequeReplyEntity get()
        {
            ChequeReplyEntity entity = new ChequeReplyEntity();

            //string cond = ChequeReplyEntity.FIELD_LETTER_TYPE + "=" + provider.getSQLString(letterType);
            provider.loadToDataSet(entity);
            return(entity);
        }
Exemplo n.º 5
0
        public ChequeReplyEntity getByCheque(int chequeid, string cond)
        {
            ChequeReplyEntity entity = new ChequeReplyEntity();

            if (cond == null || cond.Length == 0)
            {
                cond = ChequeReplyEntity.FIELD_CHEQUEID + "=" + provider.getSQLString(chequeid);
            }
            else
            {
                cond += " AND " + ChequeReplyEntity.FIELD_CHEQUEID + "=" + provider.getSQLString(chequeid);
            }
            provider.loadToDataSet(entity, cond);
            return(entity);
        }
Exemplo n.º 6
0
        private void checkColorOFCheque()
        {
            ChequeReplyEntity en = _chequeReplyBL.getByCheque(_id, "");

            if (en.Tables[en.FilledTableName].Rows.Count > 0)
            {
                _chequeBL.updateColor(_id, "");
            }
            else
            {
                ApplicationPropertiesBL appPropertiesBL = new ApplicationPropertiesBL();
                string color = appPropertiesBL.getValue(ApplicationPropertiesBL.CHEQUE_WITHNO_REPLY);
                _chequeBL.updateColor(_id, color);
            }
        }
Exemplo n.º 7
0
        private void fillGrid(string cond)
        {
            ChequeReplyEntity entity = null;

            entity = _chequeReplyBL.getByCheque(_id, cond);
            int count = entity.RowCount();

            tblReply.Height = 70 + count * 20;
            System.Collections.Hashtable hash = new Hashtable();
            if (_gridTools == null)
            {
                _gridTools = new GridTools();
            }
            _gridTools.bindDataToGrid(dataGridView1, entity, null, hash);
        }
Exemplo n.º 8
0
        public void initForm()
        {
            if (_id > 0)
            {
                ChequeReplyEntity entity    = _chequeReplyBL.get(_id);
                DateConverter     converter = new DateConverter();

                txtRecieptBillNumber.Text = entity.get(ChequeReplyEntity.FIELD_RECIEPTBILLNUMBER).ToString();
                txtIssueDate.Text         = converter.valueToString(entity.get(ChequeReplyEntity.FIELD_ISSUEDATE));
                txtPrice.Text             = entity.get(ChequeReplyEntity.FIELD_PRICE).ToString();
                txtDescription.Text       = entity.get(ChequeReplyEntity.FIELD_DESCRIPTION).ToString();
            }

            if (_id < 0)
            {
                linkAttachment.Visible = false;
            }
        }
Exemplo n.º 9
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!BeforSave())
            {
                return;
            }

            DateConverter dateconverter = new DateConverter();

            ChequeReplyEntity entity = new ChequeReplyEntity();
            DataRow           dr     = entity.Tables[entity.TableName].NewRow();

            if (_id > 0)
            {
                dr[ChequeReplyEntity.FIELD_ID] = _id;
            }

            dr[ChequeReplyEntity.FIELD_RECIEPTBILLNUMBER] = txtRecieptBillNumber.Text;
            dr[ChequeReplyEntity.FIELD_ISSUEDATE]         = dateconverter.stringToValue(txtIssueDate.Text);
            dr[ChequeReplyEntity.FIELD_CHEQUEID]          = _chequeId;
            dr[ChequeReplyEntity.FIELD_PRICE]             = txtPrice.Text;
            dr[ChequeReplyEntity.FIELD_DESCRIPTION]       = txtDescription.Text;
            entity.Tables[entity.TableName].Rows.Add(dr);

            if (_id < 0)
            {
                _id         = _chequeReplyBL.add(entity);
                lblMsg.Text = "دخیره شده ";
            }
            else
            {
                _chequeReplyBL.update(entity);
                lblMsg.Text = "به روز رسانی گردید.";
            }
            this.Close();
        }
Exemplo n.º 10
0
 public int update(ChequeReplyEntity entity)
 {
     return(((ChequeReplyDA)_abstractDA).update(entity));
 }
Exemplo n.º 11
0
 public int add(ChequeReplyEntity entity)
 {
     return(((ChequeReplyDA)_abstractDA).add(entity));
 }
Exemplo n.º 12
0
 public int update(ChequeReplyEntity entity)
 {
     return(provider.update(entity));
 }
Exemplo n.º 13
0
 public int add(ChequeReplyEntity entity)
 {
     return(provider.add(entity));
 }