public String insert(XcustPorReqDistIntAll p)
        {
            String sql = "", chk = "";

            try
            {
                //if (p.OrpChtNum.Equals(""))
                //{
                //    return "";
                //}
                //p.RowNumber = selectMaxRowNumber(p.YearId);
                //p.Active = "1";
                sql = "Insert Into " + xCPRDIA.table + "(" + xCPRDIA.ATTRIBUTE1 + "," + xCPRDIA.ATTRIBUTE_DATE1 + "," + xCPRDIA.ATTRIBUTE_CATEGORY + "," +
                      xCPRDIA.ATTRIBUTE_NUMBER1 + "," + xCPRDIA.ATTRIBUTE_TIMESTAMP1 + "," + xCPRDIA.CHARGE_ACCOUNT_SEGMENT1 + "," +
                      xCPRDIA.CHARGE_ACCOUNT_SEGMENT2 + "," + xCPRDIA.CHARGE_ACCOUNT_SEGMENT3 + "," + xCPRDIA.CHARGE_ACCOUNT_SEGMENT4 + "," +
                      xCPRDIA.CHARGE_ACCOUNT_SEGMENT5 + "," + xCPRDIA.CHARGE_ACCOUNT_SEGMENT6 + "," + xCPRDIA.PO_LINE_NUMBER + "," +
                      xCPRDIA.PO_NUMBER + "," + xCPRDIA.PROCESS_FLAG + "," + xCPRDIA.Program_running + "," +
                      xCPRDIA.QTY + ") " +
                      "Values('" + p.ATTRIBUTE1 + "','" + p.ATTRIBUTE_DATE1 + "','" + p.ATTRIBUTE_CATEGORY + "','" +
                      p.ATTRIBUTE_NUMBER1 + "',now(),'" + p.CHARGE_ACCOUNT_SEGMENT1 + "','" +
                      p.CHARGE_ACCOUNT_SEGMENT2 + "','" + p.CHARGE_ACCOUNT_SEGMENT3 + "','" + p.CHARGE_ACCOUNT_SEGMENT4 + "','" +
                      p.CHARGE_ACCOUNT_SEGMENT5 + "','" + p.CHARGE_ACCOUNT_SEGMENT6 + "','" + p.PO_LINE_NUMBER + "','" +
                      p.PO_NUMBER + "','" + p.PROCESS_FLAG + "','" + p.Program_running + "','" +
                      p.QTY + "') ";
                chk = conn.ExecuteNonQueryAutoIncrement(sql, "kfc_po");
                //chk = p.RowNumber;
                //chk = p.Code;
            }
            catch (Exception ex)
            {
                //MessageBox.Show("Error " + ex.ToString(), "insert Doctor");
            }

            return(chk);
        }
        public String insert(XcustPorReqLineIntAll p)
        {
            String sql = "", chk = "";

            try
            {
                //if (p.OrpChtNum.Equals(""))
                //{
                //    return "";
                //}
                //p.RowNumber = selectMaxRowNumber(p.YearId);
                //p.Active = "1";
                sql = "Insert Into " + xCPRLIA.table + "(" + xCPRLIA.ATTRIBUTE1 + "," + xCPRLIA.ATTRIBUTE_DATE1 + "," +
                      xCPRLIA.ATTRIBUTE_NUMBER1 + "," + xCPRLIA.ATTRIBUTE_TIMESTAMP1 + "," + xCPRLIA.Category_Name + "," +
                      xCPRLIA.CURRENCY_CODE + "," + xCPRLIA.Deliver_to_Location + "," + xCPRLIA.Deliver_to_Organization + "," +
                      xCPRLIA.Goods + "," + xCPRLIA.INVENTORY + "," + xCPRLIA.ITEM_NUMBER + "," +
                      xCPRLIA.LINFOX_PR + "," + xCPRLIA.Need_by_Date + "," + xCPRLIA.PO_LINE_NUMBER + "," +
                      xCPRLIA.PO_NUMBER + "," + xCPRLIA.Price + "," + xCPRLIA.PROCESS_FLAG + "," +
                      xCPRLIA.Procurement_BU + "," + xCPRLIA.PR_APPROVER + "," + xCPRLIA.QTY + "," +
                      xCPRLIA.requester + "," + xCPRLIA.Requisitioning_BU + "," + xCPRLIA.Subinventory + "," + xCPRLIA.SUPPLIER_CODE + "," + xCPRLIA.Supplier_Site + ") " +
                      "Values('" + p.ATTRIBUTE1 + "','" + p.ATTRIBUTE_DATE1 + "','" +
                      p.ATTRIBUTE_NUMBER1 + "',now(),'" + p.Category_Name + "','" +
                      p.CURRENCY_CODE + "','" + p.Deliver_to_Location + "','" + p.Deliver_to_Organization + "','" +
                      p.Goods + "','" + p.INVENTORY + "','" + p.ITEM_NUMBER + "','" +
                      p.LINFOX_PR + "','" + p.Need_by_Date + "','" + p.PO_LINE_NUMBER + "','" +
                      p.PO_NUMBER + "','" + p.Price + "','" + p.PROCESS_FLAG + "','" +
                      p.Procurement_BU + "','" + p.PR_APPROVER + "','" + p.QTY + "','" +
                      p.requester + "','" + p.Requisitioning_BU + "','" + p.Subinventory + "','" + p.SUPPLIER_CODE + "','" + p.Supplier_Site + "') ";
                chk = conn.ExecuteNonQueryAutoIncrement(sql, "kfc_po");
                //chk = p.RowNumber;
                //chk = p.Code;
            }
            catch (Exception ex)
            {
                //MessageBox.Show("Error " + ex.ToString(), "insert Doctor");
            }

            return(chk);
        }