Exemplo n.º 1
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bi_t_supcust_info") == false)
     {
         string sql = "create table bi_t_supcust_info(supcust_no varchar(20),supcust_flag varchar(1),sup_name varchar(50),sup_tel varchar(20),sup_pyname varchar(50)";
         sql += ",display_flag varchar(1),credit_amt decimal(18,4),other1 varchar(60),cust_level varchar(1),is_retail varchar(10),primary key (supcust_no,supcust_flag)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 2
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bi_t_item_cls") == false)
     {
         string sql;
         sql = "create table bi_t_item_cls(item_clsno varchar(20),item_flag varchar(1),item_clsname varchar(100),display_flag varchar(1),is_stop varchar(1)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 3
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("t_click_log") == false)
     {
         string sql;
         sql = "create table t_click_log(flow_id varchar(10),cus_id varchar(10),jh varchar(10),click_num varchar(10),oper_id varchar(20),oper_date datetime) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 4
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bt_sysn_info") == false)
     {
         string sql;
         sql = "CREATE TABLE bt_sysn_info(table_name VARCHAR(50), sysn_time DATETIME) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 5
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("t_print_log") == false)
     {
         string sql;
         sql = "create table t_print_log(sheet_no varchar(20) primary key,print_count integer,oper_id varchar(20),oper_date datetime) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 6
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bi_t_branch_info") == false)
     {
         string sql;
         sql = "create table bi_t_branch_info(branch_no varchar(20) PRIMARY KEY,branch_name varchar(200)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 7
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("sa_t_operator_i") == false)
     {
         string sql = "create table sa_t_operator_i(oper_id varchar(20),oper_type varchar(20),oper_name varchar(50),oper_pw varchar(50)";
         sql += ",oper_status varchar(1),update_time datetime,is_branch varchar(1),is_admin varchar(1),branch_no varchar(20)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 8
0
        public static void Upgrade(SQLiteByHandClose db)
        {
            if (db.ExistTable("sys_t_sheet_no") == false)
            {
                string sql;
                sql = "create table sys_t_sheet_no(sheet_id varchar(20),sheet_value integer) ";
                DB.IDB d = db;
                d.ExecuteScalar(sql, null);

                sql = "insert into sys_t_sheet_no values('PI',0)";
                d.ExecuteScalar(sql, null);

                sql = "insert into sys_t_sheet_no values('SO',0)";
                d.ExecuteScalar(sql, null);

                sql = "insert into sys_t_sheet_no values('RI',0)";
                d.ExecuteScalar(sql, null);
            }
        }
Exemplo n.º 9
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bt_par_setting") == false)
     {
         string sql;
         sql = "create table bt_par_setting(par_id varchar(20), par_val varchar(50)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 10
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("sys_t_system") == false)
     {
         string sql = "create table sys_t_system(sys_var_id varchar(20),sys_var_name varchar(40),sys_var_value varchar(250),is_changed varchar(2)";
         sql += ",sys_var_desc varchar(100),sys_ver_flag varchar(1),update_time datetime) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 11
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bi_t_cust_price") == false)
     {
         string sql = "create table bi_t_cust_price(cust_id varchar(20),item_no varchar(20),price_type varchar(1)";
         sql += ",new_price decimal(18,4),top_price decimal(18,4),bottom_price decimal(18,4),last_price decimal(18,4)";
         sql += ",top_sheet_no varchar(20),bottom_sheet_no varcahr(20),last_sheet_no varchar(20)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 12
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bi_t_sup_item") == false)
     {
         string sql = "create table bi_t_sup_item(sup_id varchar(20),item_no varchar(20),price decimal(18,4),top_price decimal(18,4)";
         sql += ",bottom_price decimal(18,4),last_price decimal(18,4),top_sheet_no varchar(20),bottom_sheet_no varchar(20),last_sheet_no varchar(20)";
         sql += ",spec_from datetime,spec_to datetime,spec_price decimal(18,4),item_status varchar(20)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 13
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("ic_t_inout_store_master") == false)
     {
         string sql = "create table ic_t_inout_store_master(sheet_no varchar(20) primary key,trans_no varchar(2),branch_no varchar(20)";
         sql += ",supcust_no varchar(20),total_amount decimal(18,4),inout_amount decimal(18,4),approve_flag varchar(1),oper_date datetime";
         sql += ",oper_id varchar(20),is_upload varchar(1),pay_way varchar(20)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("sm_t_salesheet_detail") == false)
     {
         string sql = "create table sm_t_salesheet_detail(sheet_no varchar(20),item_no varchar(20),item_subno varchar(20),item_name varchar(60),unit_no varchar(20),sale_price decimal(18,4)";
         sql += ",real_price decimal(18,4),cost_price decimal(18,4),sale_qnty decimal(18,4),sale_money decimal(18,4),barcode varchar(20),sheet_sort integer,other3 varchar(60)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
     //other3:是否赠送:1赠送
 }
Exemplo n.º 15
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("bi_t_item_info") == false)
     {
         string sql = "create table bi_t_item_info(item_no varchar(20) PRIMARY KEY,item_subno varchar(20),item_subname varchar(100),item_clsno varchar(20)";
         sql += ",item_name varchar(100),item_brand varchar(20),item_brandname varchar(100),unit_no varchar(20),item_size varchar(20),product_area varchar(100)";
         sql += ",barcode varchar(20),price decimal(18,4),base_price decimal(18, 4),sale_price decimal(18, 4),display_flag varchar(1),item_flag varchar(1)";
         sql += ",base_price2 decimal(18, 4),base_price3 decimal(18, 4),base_price4 decimal(18, 4),base_price5 decimal(18, 4)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 16
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("sm_t_salesheet") == false)
     {
         string sql = "create table sm_t_salesheet(sheet_no varchar(20) primary key,branch_no varchar(20),cust_no varchar(20),pay_way varchar(20)";
         sql += ",coin_no varchar(50),real_amount decimal(18,4),total_amount decimal(18,4),paid_amount decimal(18,4),approve_flag varchar(1)";
         sql += ",oper_id varchar(20),sale_man varchar(20),oper_date datetime,pay_date datetime,is_upload varchar(1),discount decimal(18,4)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
     //discount整单折扣
 }
Exemplo n.º 17
0
        public static void Upgrade(SQLiteByHandClose db)
        {
            if (db.ExistTable("ic_t_branch_stock") == false)
            {
                string sql;
                sql  = "create table ic_t_branch_stock(branch_no varchar(20),item_no varchar(20),stock_qty decimal(18,4)";
                sql += ",cost_price decimal(18,4),display_flag varchar(1),last_price decimal(18,4),fifo_price decimal(18,4)) ";

                DB.IDB d = db;
                d.ExecuteScalar(sql, null);
            }
        }
Exemplo n.º 18
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("t_order_detail") == false)
     {
         string sql = "CREATE TABLE t_order_detail(flow_id INTEGER,sheet_no VARCHAR(20),item_no VARCHAR(20),item_subno VARCHAR(20),item_name VARCHAR(50)";
         sql += ",unit_no varchar(20),oper_id VARCHAR(20),oper_date DATETIME,qty DECIMAL(18, 4),price DECIMAL(18, 4),amt DECIMAL(18, 4),jh VARCHAR(20)";
         sql += ",cost_price decimal(18,4),branch_no varchar(20),cus_no varchar(20),sup_no varchar(20),approve_flag varchar(1),is_upload VARCHAR(1)";
         sql += ",update_time datetime,update_oper varchar(20),source_price decimal(18, 4),discount decimal(18, 4),is_give varchar(1))";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 19
0
 public static void Upgrade(SQLiteByHandClose db)
 {
     if (db.ExistTable("ot_pay_flow") == false)
     {
         string sql;
         sql  = "CREATE TABLE ot_pay_flow(sheet_no varchar(50),flow_id INTEGER,cus_no VARCHAR(20),oper_id VARCHAR(20),oper_date DATETIME";
         sql += ",pay_way VARCHAR(50),sale_amount DECIMAL(18, 4),pay_amount DECIMAL(18, 4),old_amount DECIMAL(18, 4),ml DECIMAL(18, 4)";
         sql += ",jh VARCHAR(20),approve_flag VARCHAR(1),remark VARCHAR(50),is_upload char(1)) ";
         DB.IDB d = db;
         d.ExecuteScalar(sql, null);
     }
 }
Exemplo n.º 20
0
        public static void Upgrade(SQLiteByHandClose db)
        {
            if (db.ExistTable("ic_t_inout_store_detail") == false)
            {
                string sql = "create table ic_t_inout_store_detail(sheet_no varchar(20),item_no varchar(20),item_subno varchar(20),item_name varchar(60),unit_no varchar(20),in_qty decimal(18,4)";
                sql += ",orgi_price decimal(18,4),valid_price decimal(18,4),cost_price decimal(18,4),valid_date datetime,barcode varchar(20),sheet_sort integer,other3 varchar(60)) ";
                DB.IDB d = db;
                d.ExecuteScalar(sql, null);
            }

            //other3: 是否赠送:1赠送
        }