public DataSet GetOrderDetailByOrderDs(OrderDetailSearchModel input) { string orderId = input.OrderId; string productName = input.ProductName; return(dao.GetOrderDetailListByOrder(orderId)); }
/// <summary> /// 查询显示列表操作 /// </summary> public void doOperate() { this.lcOrderCode3.Text = orderModel.OrderCode; this.lcCreater3.Text = orderModel.CreateUserName.Trim(); this.lcCreateTime3.Text = orderModel.CreateDate; this.lcSaler3.Text = orderModel.SalerName; this.lcPurchaseState3.Text = orderModel.OrderState; this.lcModifyer3.Text = orderModel.ModifyUserName; this.lcModifyTime3.Text = orderModel.ModifyDate; this.lcSender3.Text = orderModel.SenderName; this.lcTotal3.Text = SetNumFormat(orderModel.Total_sum) + "元";; this.lcSalerPeople3.Text = orderModel.SalerApproverName; this.lcAffirmTiem3.Text = orderModel.SalerApproveDate; this.lcBuyerRemark3.Text = orderModel.BuyerRemark; this.lcTotalFinish3.Text = SetNumFormat(orderModel.Over_sum) + "元"; this.lcSalerRemark3.Text = orderModel.SalerRemark; //this.rtbRemarkA2.Text = orderModel.BuyerRemark; if (searchBean == null) { searchBean = new OrderDetailSearchModel(); } searchBean.OrderId = this.orderModel.Id; searchBean.ProductName = this.txtSearchKey.Text; int rows; //ds = OrderDetailOfflineBLL.GetInstance().GetOrderDetailByOrderDs(searchBean, out rows); ds = OrderDetailOfflineBLL.GetInstance().GetOrderDetailByOrderDs(searchBean); this.cachedBindingSource.DataSource = ds; this.cachedBindingSource.DataMember = "OrderDetailByOrder"; }
/// <summary> /// 按订单,显示订单详细列表 /// </summary> /// <param name="input"></param> /// <param name="param"></param> /// <returns></returns> public DataSet GetOrderDetailListByOrder(OrderDetailSearchModel input, PagedParameter param) { string orderId = input.OrderId; string productName = input.ProductName; DataSet ds = GetOrderDetailListByOrder(orderId, productName); return(ds); }
/// <summary> /// 按企业,获得分页的订单明细信息 /// </summary> /// <param name="input"></param> /// <param name="param"></param> /// <returns></returns> public DataSet GetOrderDetailDs(OrderDetailSearchModel input, PagedParameter param, out int rows) { string salerId = input.SalerId; string buyerId = input.BuyerId; string areaId = input.AreaId; string productName = input.ProductName; DataSet ds = dao.GetOrderDetailList(input, salerId, buyerId, areaId, productName, param, out rows); return(ds); }
/// <summary> /// 查询显示列表操作 /// </summary> public void doOperate() { if (searchBean == null) { searchBean = new OrderDetailSearchModel(); } searchBean.ProductName = ""; int rows; // DataSet ds = remote.GetOrderDetailListByOrder(searchBean, param, out rows); DataSet ds = null; ds = OrderDetailOfflineBLL.GetInstance().GetOrderDetailByOrderDs(searchBean, out rows); this.cachedBindingSource.DataSource = ds; this.cachedBindingSource.DataMember = "OrderDetailByOrder"; }
//按企业,获得分页的订单明细信息 public DataSet GetOrderDetailList(OrderDetailSearchModel input, string salerId, string buyerId, string areaId, string productName, PagedParameter pageParam, out int rows) { int pageNum = Int32.Parse(pageParam.PageNum); int pageSize = Int32.Parse(pageParam.PageSize); string sql = @"select h.trade_name, h.medical_name, iif(h.Spec is null,'-',h.spec) & '×' & iif(h.Stand_Rate Is Null, '-',h.Stand_Rate) & iif(h.Use_Unit Is Null, '',h.Use_Unit) & '/' & iif(h.Spec_Unit Is Null, '',h.Spec_Unit) & Switch(h.Wrap_Name Is Null, '', h.Wrap_Name='空', '',True,'(' & h.Wrap_Name & ')') As Ggbz, Switch(i.unit_price Is Null,'-',True,Trim(Format(i.unit_price, 'Standard'))) As unit_price, i.record_id, CLng(iif(i.request_qty is null,0,i.request_qty)) as request_qty, i.saler_desc, Switch(i.item_status='1','发送',i.item_status='2', '已阅读', i.item_status='3', '已送货', i.item_status='5', '作废', i.item_status='6', '缺货', i.item_status='7', '完成') as item_status, Switch(i.order_type='0','蓝票', i.order_type='1','到货', i.order_type='2','红票') As order_type, h.doseage_form, h.province_max_price, Switch(h.province_insurance_flag='0', '非国家基本医疗保险产品', h.province_insurance_flag='1', '甲类', h.province_insurance_flag='2', '乙类', h.province_insurance_flag='3', '民族药') as province_insurance_flag, h.dealer_fullname, l.name, h.last_order_date, CLng(iif(h.last_order_qty is null,0,h.last_order_qty)) as last_order_qty, Switch(i.con_type='1', '招标', i.con_type='2', '竞价', i.con_type='3', '询价', i.con_type='4', '备案', i.con_type='7', '浏览', i.con_type='9', '临时', i.con_type='c', 'GPO直销', i.con_type='d', 'GPO自主合同') as con_type, h.medical_id, h.medical_wubi, h.medical_pinyin, h.medical_code, h.spell_abbr, h.name_wb from gpo_order_item i, gpo_hit_comm h, gpo_order o, cont_list l where i.hit_comm_id = h.record_id and h.contract_id = l.id and o.order_id = i.order_id and o.saler_id = :salerId and i.buyer_orgid = :buyerId and o.area_id = :areaId"; //modify by yanbing 2007-07-10 //and o.order_state = '2' if (!String.IsNullOrEmpty(input.OrderState)) { sql = sql + " and o.order_state =:order_state"; } //查询条件:发送时间开始 if (!String.IsNullOrEmpty(input.StartDate)) { sql = sql + string.Format(" and o.create_date>CDate('{0}')", input.StartDate); } //查询条件:发送时间结束 if (!String.IsNullOrEmpty(input.EndDate)) { sql = sql + string.Format(" and o.create_date<=CDate('{0}')", input.EndDate); } //end modify List <DbParameter> parameters = new List <DbParameter>(); DbParameter salerIdPara = this.DbFacade.CreateParameter(); salerIdPara.ParameterName = "salerId"; salerIdPara.DbType = DbType.String; salerIdPara.Value = salerId; parameters.Add(salerIdPara); DbParameter buyerIdPara = this.DbFacade.CreateParameter(); buyerIdPara.ParameterName = "buyerId"; buyerIdPara.DbType = DbType.String; buyerIdPara.Value = buyerId; parameters.Add(buyerIdPara); DbParameter areaIdPara = this.DbFacade.CreateParameter(); areaIdPara.ParameterName = "areaId"; areaIdPara.DbType = DbType.String; areaIdPara.Value = areaId; parameters.Add(areaIdPara); //modify by yanbing 2007-07-11 if (!String.IsNullOrEmpty(input.OrderState)) { DbParameter orderStatePara = this.DbFacade.CreateParameter(); orderStatePara.ParameterName = "order_state"; orderStatePara.DbType = DbType.String; orderStatePara.Value = input.OrderState; parameters.Add(orderStatePara); } //查询条件:创建人 if (!String.IsNullOrEmpty(input.Creater)) { sql = sql + " and UCase(o.create_username) like :creater"; DbParameter createrPara = this.DbFacade.CreateParameter(); createrPara.ParameterName = "creater"; createrPara.DbType = DbType.String; createrPara.Value = ComUtil.GetLike(input.Creater.ToUpper()); parameters.Add(createrPara); } //查询条件:1卖方企业或2订单号 if ("1".Equals(input.SearchField)) { if (!String.IsNullOrEmpty(input.SearchKey)) { sql = sql + " and UCase(o.saler_name & o.saler_easy & o.saler_wubi & o.saler_fast) like :org "; DbParameter orgPara = this.DbFacade.CreateParameter(); orgPara.ParameterName = "org"; orgPara.DbType = DbType.String; orgPara.Value = ComUtil.GetLike(input.SearchKey.ToUpper()); parameters.Add(orgPara); } } if ("2".Equals(input.SearchField)) { if (!String.IsNullOrEmpty(input.SearchKey)) { sql = sql + " and UCase(o.order_code) like :code "; DbParameter codePara = this.DbFacade.CreateParameter(); codePara.ParameterName = "code"; codePara.DbType = DbType.String; codePara.Value = ComUtil.GetLike(input.SearchKey.ToUpper()); parameters.Add(codePara); } } //end modify int count = 3; if (!((productName == null) || (productName == ""))) { string appender = @" And (h.medical_name Like :productName Or h.medical_id Like :productName Or h.medical_wubi Like :productName Or h.medical_pinyin Like :productName Or h.medical_code Like :productName Or h.trade_name Like :productName Or h.spell_abbr Like :productName Or h.name_wb Like :productName) "; sql += appender; count = 4; DbParameter productNamePara = this.DbFacade.CreateParameter(); productNamePara.ParameterName = "productName"; productNamePara.DbType = DbType.String; productNamePara.Value = ComUtil.GetLike(productName); parameters.Add(productNamePara); } if ((salerId == null)) { throw new System.ArgumentNullException("salerId"); } if ((buyerId == null)) { throw new System.ArgumentNullException("buyerId"); } if ((areaId == null)) { parameters[2].Value = System.DBNull.Value; } rows = base.GetRowCount(sql, parameters.ToArray()); //string pagedSql = base.GetPagedSql(sql, pageNum, pageSize); DataTable table = base.DbFacade.SQLExecuteDataTable(sql.ToString(), parameters.ToArray()); table.TableName = "OrderDetail"; DataSet ds = new DataSet(); ds.Tables.Add(table); return(ds); }