//public object HashTable { get; private set; } protected override void SetPowerZone() { //CostType.DataSource = BLL.C_CostType.GetList(" 1 = 1 order by ID"); //CostType.DataTextField = "Name"; //CostType.DataValueField = "ID"; //CostType.DataBind(); ComDate.Value = DateTime.Now.ToString(); txtGoodCount.Value = 0.ToString(); txtGoodPrice.Value = 0.ToString(); txtGood.DataSource = BLL.Goods.GetList(" IsDeleted = 0 order by GID"); txtGood.DataTextField = "GName"; txtGood.DataValueField = "GID"; txtGood.DataBind(); txtGood.Items.Insert(0, "--请选择--"); //Spare2.DataSource = BLL.C_Car.GetList(" IsDelete = 0 and CType='牵引车' order by ID"); //Spare2.DataTextField = "PZCode"; //Spare2.DataValueField = "PZCode"; //Spare2.DataBind(); //CSpare2.DataSource = BLL.C_Car.GetList(" IsDelete = 0 and CType='挂车' order by ID"); //CSpare2.DataTextField = "PZCode"; //CSpare2.DataValueField = "PZCode"; //CSpare2.DataBind(); SupplierName.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and Type=1 order by ID"); SupplierName.DataTextField = "Name"; SupplierName.DataValueField = "ID"; SupplierName.DataBind(); SupplierName.Items.Insert(0, "--请选择--"); SupplierName2.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and Type=2 order by ID"); SupplierName2.DataTextField = "Name"; SupplierName2.DataValueField = "ID"; SupplierName2.DataBind(); SupplierName2.Items.Insert(0, "--请选择--"); SupplierName3.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 order by ID"); SupplierName3.DataTextField = "Name"; SupplierName3.DataValueField = "ID"; SupplierName3.DataBind(); SupplierName3.Items.Insert(0, "--请选择--"); Name.Value = DateTime.Now.ToString("yyyyMMddHHmmssfff"); if (!string.IsNullOrEmpty(Request.QueryString["oid"])) { ocode.Value = Request.QueryString["oid"]; oid.Value = Request.QueryString["oid"]; } else { } if (!string.IsNullOrEmpty(Request.QueryString["id"])) { Name.Value = BLL.C_CarTast.GetModel(Convert.ToInt32(Request.QueryString["id"])).Name; } //ocode.Disabled = true; }
protected override void SetPowerZone() { txtGood.DataSource = BLL.Goods.GetList(" IsDeleted = 0 order by GID"); txtGood.DataTextField = "GName"; txtGood.DataValueField = "GID"; txtGood.DataBind(); txtGood.Items.Insert(0, "--请选择--"); SupplierName.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') and Type=1 order by ID"); SupplierName.DataTextField = "Name"; SupplierName.DataValueField = "ID"; SupplierName.DataBind(); SupplierName.Items.Insert(0, "--请选择--"); SupplierName2.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') and Type=2 order by ID"); SupplierName2.DataTextField = "Name"; SupplierName2.DataValueField = "ID"; SupplierName2.DataBind(); SupplierName2.Items.Insert(0, "--请选择--"); SupplierName3.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') order by ID"); SupplierName3.DataTextField = "Name"; SupplierName3.DataValueField = "ID"; SupplierName3.DataBind(); SupplierName3.Items.Insert(0, "--请选择--"); Name.Value = DateTime.Now.ToString("yyyyMMddHHmmssfff"); if (!string.IsNullOrEmpty(Request.QueryString["oid"])) { ocode.Value = Request.QueryString["oid"]; oid.Value = Request.QueryString["oid"]; } else { } if (!string.IsNullOrEmpty(Request.QueryString["id"])) { Model.C_CarTast ct = BLL.C_CarTast.GetModel(Convert.ToInt32(Request.QueryString["id"])); Name.Value = ct.Name; sid.Value = ct.SupplierName; if (ct.TType == 1) { SupplierName.Value = ct.SupplierName; } else if (ct.TType == 2) { SupplierName2.Value = ct.SupplierName; } else { SupplierName3.Value = ct.SupplierName; } SupplierAddress.Value = ct.SupplierAddress; Model.OrderDetail od = BLL.OrderDetail.GetModelCode(ct.OCode); if (od != null) { txtGood.Value = od.GId.ToString(); txtGoodCount.Value = od.GCount.ToString(); txtGoodPrice.Value = od.BuyPrice.ToString(); } //装车信息 if (ct.TType != 1) { xcView.Visible = false; tcode = ct.TCode; CTModel = BLL.C_CarTast.GetModelname(tcode); if (CTModel != null) { SuppModel = BLL.C_Supplier.GetModel(Convert.ToInt32(CTModel.SupplierName)); if (!string.IsNullOrEmpty(CTModel.OCode)) { OdModel = BLL.OrderDetail.GetList(" ordercode='" + CTModel.OCode + "'; ").FirstOrDefault(); Good = BLL.Goods.GetModel(OdModel.GId); } } } else { zcView.Visible = false; List <Model.C_CarTast> carList = BLL.C_CarTast.GetModelList(" TCode='" + ct.Name + "' "); foreach (var item in carList) { CarTast cModel = new CarTast(); cModel.Code = item.Name; cModel.Supp = BLL.C_Supplier.GetModel(Convert.ToInt32(item.SupplierName)).Name; Model.OrderDetail XCod = BLL.OrderDetail.GetModelCode(item.OCode); if (XCod != null) { cModel.Count = XCod.GCount; cModel.ReCount = XCod.ReCount; cModel.GoodName = BLL.Goods.GetModel(Convert.ToInt32(XCod.GId)).GName; } cModel.CreateTime = item.CreateDate; XCList.Add(cModel); } } } //ocode.Disabled = true; }
protected override void SetPowerZone() { //CostType.DataSource = BLL.C_CostType.GetList(" 1 = 1 order by ID"); //CostType.DataTextField = "Name"; //CostType.DataValueField = "ID"; //CostType.DataBind(); txtGood.DataSource = BLL.Goods.GetList(" IsDeleted = 0 order by GID"); txtGood.DataTextField = "GName"; txtGood.DataValueField = "GID"; txtGood.DataBind(); Spare2.DataSource = BLL.C_Car.GetList(" IsDelete = 0 and CType='牵引车' order by ID"); Spare2.DataTextField = "PZCode"; Spare2.DataValueField = "PZCode"; Spare2.DataBind(); CSpare2.DataSource = BLL.C_Car.GetList(" IsDelete = 0 and CType='挂车' order by ID"); CSpare2.DataTextField = "PZCode"; CSpare2.DataValueField = "PZCode"; CSpare2.DataBind(); SupplierName.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and Type=1 order by ID"); SupplierName.DataTextField = "Name"; SupplierName.DataValueField = "ID"; SupplierName.DataBind(); SupplierName.Items.Insert(0, "--请选择--"); SupplierName2.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and Type=2 order by ID"); SupplierName2.DataTextField = "Name"; SupplierName2.DataValueField = "ID"; SupplierName2.DataBind(); SupplierName2.Items.Insert(0, "--请选择--"); SupplierName3.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 order by ID"); SupplierName3.DataTextField = "Name"; SupplierName3.DataValueField = "ID"; SupplierName3.DataBind(); SupplierName3.Items.Insert(0, "--请选择--"); CarSJ1.DataSource = BLL.Member.ManageMember.GetMemberEntityList(" RoleCode='SiJi' AND FMID='1' AND IsClock=0 AND IsClose=0 order by ID"); CarSJ1.DataTextField = "mname"; CarSJ1.DataValueField = "MID"; CarSJ1.DataBind(); //CarSJ1.Items.Insert(0, "--请选择--"); CarSJ2.DataSource = BLL.Member.ManageMember.GetMemberEntityList(" RoleCode='SiJi' AND FMID IN('2','3') AND IsClock=0 AND IsClose=0 order by ID"); CarSJ2.DataTextField = "mname"; CarSJ2.DataValueField = "MID"; CarSJ2.DataBind(); //CarSJ2.Items.Insert(0, "--请选择--"); binddata(Request.QueryString["id"]); if (!string.IsNullOrEmpty(Request.QueryString["oid"])) { ocode.Value = Request.QueryString["oid"]; oid.Value = Request.QueryString["oid"]; } else { } //ocode.Disabled = true; }
protected override void SetPowerZone() { tcode = Request.QueryString["tcode"]; CTModel = BLL.C_CarTast.GetModelname(tcode); SuppModel = BLL.C_Supplier.GetModel(Convert.ToInt32(CTModel.SupplierName)); if (!string.IsNullOrEmpty(CTModel.OCode)) { OdModel = BLL.OrderDetail.GetList(" ordercode='" + CTModel.OCode + "'; ").FirstOrDefault(); Good = BLL.Goods.GetModel(OdModel.GId); } txtGood.DataSource = BLL.Goods.GetList(" IsDeleted = 0 order by GID"); txtGood.DataTextField = "GName"; txtGood.DataValueField = "GID"; txtGood.DataBind(); txtGood.Items.Insert(0, "--请选择--"); SupplierName.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') and Type=1 order by ID"); SupplierName.DataTextField = "Name"; SupplierName.DataValueField = "ID"; SupplierName.DataBind(); SupplierName.Items.Insert(0, "--请选择--"); SupplierName2.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') and Type=2 order by ID"); SupplierName2.DataTextField = "Name"; SupplierName2.DataValueField = "ID"; SupplierName2.DataBind(); SupplierName2.Items.Insert(0, "--请选择--"); SupplierName3.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') order by ID"); SupplierName3.DataTextField = "Name"; SupplierName3.DataValueField = "ID"; SupplierName3.DataBind(); SupplierName3.Items.Insert(0, "--请选择--"); Name.Value = DateTime.Now.ToString("yyyyMMddHHmmssfff"); if (!string.IsNullOrEmpty(Request.QueryString["oid"])) { ocode.Value = Request.QueryString["oid"]; oid.Value = Request.QueryString["oid"]; } else { } if (!string.IsNullOrEmpty(Request.QueryString["id"])) { Model.C_CarTast ct = BLL.C_CarTast.GetModel(Convert.ToInt32(Request.QueryString["id"])); Name.Value = ct.Name; sid.Value = ct.SupplierName; if (ct.TType == 1) { SupplierName.Value = ct.SupplierName; } else if (ct.TType == 2) { SupplierName2.Value = ct.SupplierName; } else { SupplierName3.Value = ct.SupplierName; } SupplierAddress.Value = ct.SupplierAddress; Model.OrderDetail od = BLL.OrderDetail.GetModelCode(ct.OCode); if (od != null) { txtGood.Value = od.GId.ToString(); txtGoodCount.Value = od.GCount.ToString(); txtGoodPrice.Value = od.BuyPrice.ToString(); } } }
protected override void SetPowerZone() { //CostType.DataSource = BLL.C_CostType.GetList(" 1 = 1 order by ID"); //CostType.DataTextField = "Name"; //CostType.DataValueField = "ID"; //CostType.DataBind(); txtGood.DataSource = BLL.Goods.GetList(" IsDeleted = 0 order by GID"); txtGood.DataTextField = "GName"; txtGood.DataValueField = "GID"; txtGood.DataBind(); txtGood.Items.Insert(0, "--请选择--"); // Spare2.DataSource = BLL.C_Car.GetList(" IsDelete = 0 and CType='牵引车' order by ID"); //Spare2.DataTextField = "PZCode"; //Spare2.DataValueField = "PZCode"; //Spare2.DataBind(); //CSpare2.DataSource = BLL.C_Car.GetList(" IsDelete = 0 and CType='挂车' order by ID"); //CSpare2.DataTextField = "PZCode"; //CSpare2.DataValueField = "PZCode"; //CSpare2.DataBind(); SupplierName.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') and Type=1 order by ID"); SupplierName.DataTextField = "Name"; SupplierName.DataValueField = "ID"; SupplierName.DataBind(); SupplierName.Items.Insert(0, "--请选择--"); SupplierName2.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') and Type=2 order by ID"); SupplierName2.DataTextField = "Name"; SupplierName2.DataValueField = "ID"; SupplierName2.DataBind(); SupplierName2.Items.Insert(0, "--请选择--"); SupplierName3.DataSource = BLL.C_Supplier.GetList(" IsDelete = 0 and (Spare3 is null or Spare3='') order by ID"); SupplierName3.DataTextField = "Name"; SupplierName3.DataValueField = "ID"; SupplierName3.DataBind(); SupplierName3.Items.Insert(0, "--请选择--"); Name.Value = DateTime.Now.ToString("yyyyMMddHHmmssfff"); if (!string.IsNullOrEmpty(Request.QueryString["oid"])) { ocode.Value = Request.QueryString["oid"]; oid.Value = Request.QueryString["oid"]; } else { } if (!string.IsNullOrEmpty(Request.QueryString["id"])) { Model.C_CarTast ct = BLL.C_CarTast.GetModel(Convert.ToInt32(Request.QueryString["id"])); Name.Value = ct.Name; sid.Value = ct.SupplierName; if (ct.TType == 1) { SupplierName.Value = ct.SupplierName; } else if (ct.TType == 2) { SupplierName2.Value = ct.SupplierName; } else { SupplierName3.Value = ct.SupplierName; } SupplierAddress.Value = ct.SupplierAddress; Model.OrderDetail od = BLL.OrderDetail.GetModelCode(ct.OCode); if (od != null) { txtGood.Value = od.GId.ToString(); txtGoodCount.Value = od.GCount.ToString(); txtGoodPrice.Value = od.BuyPrice.ToString(); } } //ocode.Disabled = true; }