Ejemplo n.º 1
0
 public FrmExpenseDrawD(XtrimControl x, String id, String cusid, String cusnamet, String cusaddr, String custax, StatusPage statuspage, StatusPayType statuspaytype)
 {
     InitializeComponent();
     xC                 = x;
     drawdId            = id;
     cusId              = cusid;
     cusNameT           = cusnamet;
     cusAddr            = cusaddr;
     cusTax             = custax;
     this.statusPage    = statuspage;
     this.statuspaytype = statuspaytype;
     initConfig();
 }
Ejemplo n.º 2
0
        public DataTable selectToPayAll1(String year, StatusPay spay, StatusPayType spaytype)
        {
            DataTable dt = new DataTable();
            String    wherestatuspay = "", wherestatuspaytype = "", wherestatuspage = "";

            if (spay == StatusPay.waitappv)
            {
                wherestatuspay = " and " + expnC.status_appv + " in ('1','0') and " + expnC.status_pay + "='1'";
            }
            else if (spay == StatusPay.appv)
            {
                wherestatuspay = " and " + expnC.status_appv + "='2' and " + expnC.status_pay + "='1'";
            }
            else if (spay == StatusPay.all)
            {
                wherestatuspay = "";
            }
            if (spaytype == StatusPayType.Cash)
            {
                wherestatuspaytype = " and " + expnC.status_pay_type + " ='1' ";
            }
            else if (spaytype == StatusPayType.Cheque)
            {
                wherestatuspaytype = " and " + expnC.status_pay_type + " ='2' ";
            }
            else if (spaytype == StatusPayType.all)
            {
                wherestatuspaytype = " and " + expnC.status_pay_type + " in ('1','2') ";
            }
            wherestatuspage = " and " + expnC.status_page + "='1' ";
            String sql = "select expC." + expnC.expenses_draw_id + "," + expnC.expenses_draw_code + "," + expnC.desc1 + "," + expnC.remark + "," + expnC.amount + "," + expnC.status_appv + "," + expnC.status_pay_type + "," + expnC.status_pay + " " +
                         "From " + expnC.table + " expC " +
                         " " +
                         "Where expC." + expnC.active + " ='1' and " + expnC.year + "='" + year + "' " + wherestatuspay + wherestatuspaytype + wherestatuspage;

            dt = conn.selectData(conn.conn, sql);

            return(dt);
        }