/// <summary> /// 查看订单按钮 /// </summary> /// <param name="order_id"></param> private void viewOrderSheet(string order_id) { string sql = "select OSM_ORDER_SHEET.ID,OFFERSHEET_ID,ORDER_STATE,ORDER_DATE,PAY_MODE,PAY_STATE,ALREADY_PAYMENT,PRE_PAYMENT,REQUIRE_PAYMENT,OFFERSHEET_CODE "; sql += " from (OSM_ORDER_SHEET inner join OSM_OFFER_SHEET on OSM_ORDER_SHEET.OFFERSHEET_ID = OSM_OFFER_SHEET.ID) "; sql += " where OSM_ORDER_SHEET.ID = " + order_id + " "; AccessDB adb = new AccessDB(); DataTable dt = adb.SQLTableQuery(sql); Hashtable hashtable = new Hashtable(); if (dt.Rows.Count == 1) { DataRow dr = dt.Rows[0]; hashtable.Add("ID", dr["ID"]); hashtable.Add("OFFERSHEET_ID", dr["OFFERSHEET_ID"]); hashtable.Add("ORDER_STATE", dr["ORDER_STATE"]); hashtable.Add("ORDER_DATE", dr["ORDER_DATE"]); hashtable.Add("PAY_MODE", dr["PAY_MODE"]); hashtable.Add("PAY_STATE", dr["PAY_STATE"]); hashtable.Add("ALREADY_PAYMENT", dr["ALREADY_PAYMENT"]); hashtable.Add("PRE_PAYMENT", dr["PRE_PAYMENT"]); hashtable.Add("REQUIRE_PAYMENT", dr["REQUIRE_PAYMENT"]); hashtable.Add("OFFERSHEET_CODE", dr["OFFERSHEET_CODE"]); } FormOSM_Order_View orderView = new FormOSM_Order_View(); orderView.setOrderID(order_id); //设置窗口状态为查看 orderView.setViewState(0); orderView.viewOrderSheet(hashtable); orderView.StartPosition = FormStartPosition.CenterParent; orderView.ShowDialog(); }
/// <summary> /// 查看订单按钮 /// </summary> /// <param name="order_id"></param> private void viewOrderSheet(string order_id) { string sql = "select OSM_ORDER_SHEET.ID,OFFERSHEET_ID,ORDER_STATE,ORDER_DATE,PAY_MODE,PAY_STATE,ALREADY_PAYMENT,PRE_PAYMENT,REQUIRE_PAYMENT,OFFERSHEET_CODE "; sql += " from (OSM_ORDER_SHEET inner join OSM_OFFER_SHEET on OSM_ORDER_SHEET.OFFERSHEET_ID = OSM_OFFER_SHEET.ID) "; sql += " where OSM_ORDER_SHEET.ID = " + order_id + " "; AccessDB adb = new AccessDB(); DataTable dt = adb.SQLTableQuery(sql); Hashtable hashtable = new Hashtable(); if (dt.Rows.Count == 1) { DataRow dr = dt.Rows[0]; hashtable.Add("ID", dr["ID"]); hashtable.Add("OFFERSHEET_ID", dr["OFFERSHEET_ID"]); hashtable.Add("ORDER_STATE", dr["ORDER_STATE"]); hashtable.Add("ORDER_DATE", dr["ORDER_DATE"]); hashtable.Add("PAY_MODE", dr["PAY_MODE"]); hashtable.Add("PAY_STATE", dr["PAY_STATE"]); hashtable.Add("ALREADY_PAYMENT", dr["ALREADY_PAYMENT"]); hashtable.Add("PRE_PAYMENT", dr["PRE_PAYMENT"]); hashtable.Add("REQUIRE_PAYMENT", dr["REQUIRE_PAYMENT"]); hashtable.Add("OFFERSHEET_CODE", dr["OFFERSHEET_CODE"]); } FormOSM_Order_View orderView = new FormOSM_Order_View(); orderView.setOrderID(order_id); //设置窗口状态为查看 orderView.setViewState(0); orderView.viewOrderSheet(hashtable); orderView.StartPosition = FormStartPosition.CenterParent; orderView.ShowDialog(); }