Esempio n. 1
0
        public String update(BillTranItems p)
        {
            String re  = "";
            String sql = "";

            sql = "Update " + btI.table + " Set " +
                  "" + btI.billmuad + "='" + p.billmuad + "'" +
                  "," + btI.chargeamt + "='" + p.chargeamt + "'" +
                  "," + btI.claimamount + "='" + p.claimamount + "'" +
                  "," + btI.claimcat + "='" + p.claimcat + "'" +
                  "," + btI.claimup + "='" + p.claimup + "'" +
                  "," + btI.desc1 + "='" + p.desc1.Replace("'", "''") + "'" +
                  "," + btI.invno + "='" + p.invno + "'" +
                  "," + btI.lccode + "='" + p.lccode + "'" +
                  "," + btI.qty + "='" + p.qty + "'" +
                  "," + btI.stdcode + "='" + p.stdcode + "'" +
                  "," + btI.svdate + "='" + p.svdate + "'" +
                  "," + btI.svrefid + "='" + p.svrefid + "'" +
                  "," + btI.up + "='" + p.up + "' " +
                  "Where " + btI.billtran_items_id + "='" + p.billtran_items_id + "'";

            re = conn.ExecuteNonQuery1(conn.connSSData, sql);

            return(re);
        }
Esempio n. 2
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < grdView.Sheets[0].RowCount; i++)
     {
         String edit = "";
         edit = grdView.Sheets[0].Cells[i, colEdit].Value.ToString();
         if (edit.Equals("1"))
         {
             BillTranItems bti = new BillTranItems();
             btI.billmuad          = grdView.Sheets[0].Cells[i, colbillmuad].Value.ToString();
             btI.billtran_id       = grdView.Sheets[0].Cells[i, colbtid].Value.ToString();
             btI.billtran_items_id = grdView.Sheets[0].Cells[i, colId].Value.ToString();
             btI.chargeamt         = grdView.Sheets[0].Cells[i, colchargeamt].Value.ToString();
             btI.claimamount       = grdView.Sheets[0].Cells[i, colClaimamount].Value.ToString();
             btI.claimcat          = grdView.Sheets[0].Cells[i, colclaimcat].Value.ToString();
             btI.claimup           = grdView.Sheets[0].Cells[i, colclaimup].Value.ToString();
             btI.desc1             = grdView.Sheets[0].Cells[i, coldesc1].Value.ToString();
             btI.invno             = grdView.Sheets[0].Cells[i, colinvno].Value.ToString();
             btI.lccode            = grdView.Sheets[0].Cells[i, collccode].Value.ToString();
             btI.qty     = grdView.Sheets[0].Cells[i, colqty].Value.ToString();
             btI.stdcode = grdView.Sheets[0].Cells[i, colstdcode].Value.ToString();
             btI.svdate  = grdView.Sheets[0].Cells[i, colsvdate].Value.ToString();
             btI.svrefid = grdView.Sheets[0].Cells[i, colsvrefid].Value.ToString();
             btI.up      = grdView.Sheets[0].Cells[i, colup].Value.ToString();
             String re = sC.mHisDB.btIDB.update(btI);
             if (re.Equals("1"))
             {
                 grdView.Sheets[0].Cells[i, 0, i, colCnt - 1].BackColor = Color.GreenYellow;
             }
         }
     }
 }
Esempio n. 3
0
 private void initConfig(SSDataControl sc)
 {
     sC    = sc;
     bt    = new BillTran();
     btI   = new BillTranItems();
     fEdit = grdView.Font;
     fEdit = new Font(fEdit, FontStyle.Bold);
     //setGrdViewH();
     setGrdView();
 }
Esempio n. 4
0
        public String insert(BillTranItems p)
        {
            String re  = "";
            String sql = "";

            //p.active = "1";

            sql = "Insert Into " + btI.table + "(" + btI.billmuad + "," + btI.billtran_id + "," + btI.chargeamt + "," +
                  btI.claimamount + "," + btI.claimcat + "," + btI.claimup + "," +
                  btI.desc1 + "," + btI.invno + "," + btI.lccode + "," +
                  btI.qty + "," + btI.stdcode + "," + btI.svdate + "," +
                  btI.svrefid + "," + btI.up +
                  ") " +
                  "Values('" + p.billmuad + "','" + p.billtran_id + "','" + p.chargeamt + "','" +
                  p.claimamount + "','" + p.claimcat + "','" + p.claimup + "','" +
                  p.desc1 + "','" + p.invno + "','" + p.lccode + "','" +
                  p.qty + "','" + p.stdcode + "','" + p.svdate + "','" +
                  p.svrefid + "','" + p.up +
                  "') ";
            re = conn.ExecuteNonQueryNoClose(conn.connSSDataNoClose, sql);

            return(re);
        }
Esempio n. 5
0
        public BillTranItemsDB(ConnectDB c)
        {
            conn                  = c;
            btI                   = new BillTranItems();
            btI.billmuad          = "billmuad";
            btI.billtran_id       = "billtran_id";
            btI.billtran_items_id = "billtran_items_id";
            btI.chargeamt         = "chargeamt";
            btI.claimamount       = "claimamount";
            btI.claimcat          = "claimcat";
            btI.claimup           = "claimup";
            btI.desc1             = "desc1";
            btI.invno             = "invno";
            btI.lccode            = "lccode";
            btI.qty               = "qty";
            btI.stdcode           = "stdcode";
            btI.svdate            = "svdate";
            btI.svrefid           = "svrefid";
            btI.up                = "up";

            btI.table   = "t_billtran_items";
            btI.pkField = "billtran_items_id";
        }