From 56da44e89e1080e5649788f101d4805f8e761ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Wed, 12 Aug 2020 10:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=20=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SCP/SCP.csproj | 42 +- SCP/Views/PlanData/MakeSupplierAccount.aspx | 40 -- .../PlanData/MakeSupplierAccount.aspx.cs | 153 ------ .../MakeSupplierAccount.aspx.designer.cs | 78 --- SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx | 51 -- SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx.cs | 181 ------- .../PlanData/SCP_PLAN_DETAIL.aspx.designer.cs | 96 ---- SCP/Views/PlanData/SCP_PLAN_LIST.aspx | 71 --- SCP/Views/PlanData/SCP_PLAN_LIST.aspx.cs | 494 ------------------ .../PlanData/SCP_PLAN_LIST.aspx.designer.cs | 123 ----- SCP/Views/PlanData/SCP_PLAN_VENDER.aspx | 74 --- SCP/Views/PlanData/SCP_PLAN_VENDER.aspx.cs | 361 ------------- .../PlanData/SCP_PLAN_VENDER.aspx.designer.cs | 159 ------ SCP/Views/PlanData/SCP_RECEIVE_PLAN.aspx | 17 - SCP/Views/PlanData/SCP_RECEIVE_PLAN.aspx.cs | 17 - .../SCP_RECEIVE_PLAN.aspx.designer.cs | 26 - 16 files changed, 2 insertions(+), 1981 deletions(-) delete mode 100644 SCP/Views/PlanData/MakeSupplierAccount.aspx delete mode 100644 SCP/Views/PlanData/MakeSupplierAccount.aspx.cs delete mode 100644 SCP/Views/PlanData/MakeSupplierAccount.aspx.designer.cs delete mode 100644 SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx delete mode 100644 SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx.cs delete mode 100644 SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx.designer.cs delete mode 100644 SCP/Views/PlanData/SCP_PLAN_LIST.aspx delete mode 100644 SCP/Views/PlanData/SCP_PLAN_LIST.aspx.cs delete mode 100644 SCP/Views/PlanData/SCP_PLAN_LIST.aspx.designer.cs delete mode 100644 SCP/Views/PlanData/SCP_PLAN_VENDER.aspx delete mode 100644 SCP/Views/PlanData/SCP_PLAN_VENDER.aspx.cs delete mode 100644 SCP/Views/PlanData/SCP_PLAN_VENDER.aspx.designer.cs delete mode 100644 SCP/Views/PlanData/SCP_RECEIVE_PLAN.aspx delete mode 100644 SCP/Views/PlanData/SCP_RECEIVE_PLAN.aspx.cs delete mode 100644 SCP/Views/PlanData/SCP_RECEIVE_PLAN.aspx.designer.cs diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj index f67e90b..9e753fd 100644 --- a/SCP/SCP.csproj +++ b/SCP/SCP.csproj @@ -2920,23 +2920,18 @@ - - - - - @@ -5137,13 +5132,6 @@ ASN_STATE.aspx - - MakeSupplierAccount.aspx - ASPXCodeBehind - - - MakeSupplierAccount.aspx - SCP_ASK.aspx ASPXCodeBehind @@ -5172,13 +5160,6 @@ SCP_PART_LIFE_DETAIL.aspx - - SCP_PLAN_DETAIL.aspx - ASPXCodeBehind - - - SCP_PLAN_DETAIL.aspx - SCP_INCOMPLETE_ASK.aspx ASPXCodeBehind @@ -5200,20 +5181,6 @@ SCP_ASN_DETAIL_View.aspx - - SCP_PLAN_LIST.aspx - ASPXCodeBehind - - - SCP_PLAN_LIST.aspx - - - SCP_PLAN_VENDER.aspx - ASPXCodeBehind - - - SCP_PLAN_VENDER.aspx - SCP_PO_PLAN_EXTEND.aspx @@ -5248,13 +5215,6 @@ SCP_RECEIVE_EXTEND.aspx - - SCP_RECEIVE_PLAN.aspx - ASPXCodeBehind - - - SCP_RECEIVE_PLAN.aspx - SCP_ASK_UNCOMPLETE.aspx ASPXCodeBehind @@ -6285,6 +6245,8 @@ 62030 / http://localhost:6789/ + True + http://localhost:6789/ False False diff --git a/SCP/Views/PlanData/MakeSupplierAccount.aspx b/SCP/Views/PlanData/MakeSupplierAccount.aspx deleted file mode 100644 index 7cef774..0000000 --- a/SCP/Views/PlanData/MakeSupplierAccount.aspx +++ /dev/null @@ -1,40 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MakeSupplierAccount.aspx.cs" Inherits="SCP.Views.PlanData.MakeSupplierAccount" %> - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SCP/Views/PlanData/MakeSupplierAccount.aspx.cs b/SCP/Views/PlanData/MakeSupplierAccount.aspx.cs deleted file mode 100644 index e745e20..0000000 --- a/SCP/Views/PlanData/MakeSupplierAccount.aspx.cs +++ /dev/null @@ -1,153 +0,0 @@ -using CK.SCP.Controller; -using CK.SCP.Models.AppBoxEntity; -using FineUI; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace SCP.Views.PlanData -{ - public partial class MakeSupplierAccount : PageBase - { - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - BindVender(); - } - - } - private void BindVender() - { - if (CurrentUser.FactoryList != null && CurrentUser.FactoryList.Count > 0) - { - var ls = SCP_TB_VENDER_CONTROLLER.Getlist(CurrentUser.FactoryList.FirstOrDefault()); - - var lsVender=ls.Where(p => p.VendId.Substring(0, 1) == "R").ToList(); - lsVender.ForEach(p => { - p.VendName = string.Format("{0}({1})", p.VendName, p.VendId); - }); - ddl_Vender.DataSource = lsVender; - ddl_Vender.DataTextField = "VendName"; - ddl_Vender.DataValueField = "VendId"; - ddl_Vender.DataBind(); - } - } - - - - - - protected void btnCreate_Click(object sender, EventArgs e) - { - try - { - string _username = ddl_Vender.SelectedValue + "@" + CurrentUser.FactoryList.FirstOrDefault(); - var userList = DB.Users.Where(p => p.Name == _username).ToList(); - if (userList.Count == 0) - { - User item = new User(); - item.Name = _username; - if (string.IsNullOrEmpty(TXT_PASSWORD.Text)) - { - item.Password = PasswordUtil.CreateDbPassword("666666"); - } - else - { - item.Password = PasswordUtil.CreateDbPassword(TXT_PASSWORD.Text); - } - item.ChineseName = ddl_Vender.SelectedText; - item.Gender = "男"; - item.CompanyEmail = ddl_Vender.SelectedValue + "@" + CurrentUser.FactoryList.FirstOrDefault() + ".com"; - item.Email = ddl_Vender.SelectedValue + "@" + CurrentUser.FactoryList.FirstOrDefault() + ".com"; - item.Remark = CurrentUser.FactoryList.FirstOrDefault(); - item.Enabled = true; - item.CreateTime = DateTime.Now; - item.SupplierCode = ddl_Vender.SelectedValue; - if (!string.IsNullOrEmpty(ddl_Vender.SelectedValue)) - { - var _role = DB.Roles.Where(p => p.Name == "供应商").FirstOrDefault(); - if (_role != null) - { - item.Roles = new List(); - int[] roleIDs = new int[] { _role.ID }; - AddEntities(item.Roles, roleIDs); - } - item.SupplierCode = ddl_Vender.SelectedValue; - } - DB.Users.Add(item); - } - else - { - Alert.Show("用户已经存在,不能创建!"); - return; - } - if (DB.SaveChanges() != -1) - { - try - { - var user = DB.Users.Where(p => p.Name == _username).FirstOrDefault(); - if (user != null) - { - if (!string.IsNullOrEmpty(CurrentUser.FactoryList.FirstOrDefault())) - { - var _VenderUsers = DB.VenderUsers.Where(p => p.UserId == user.ID).ToList(); - if (_VenderUsers != null && _VenderUsers.Count > 0) - { - DB.VenderUsers.RemoveRange(_VenderUsers); - } - List _vList = new List(); - VenderUsers _vus = new VenderUsers(); - _vus.UserId = user.ID; - _vus.VenderId = ddl_Vender.SelectedValue; - _vList.Add(_vus); - if (_vList.Count > 0) - { - var ls = _vList.Where(p => p.UserId > 0 && !string.IsNullOrEmpty(p.VenderId)); - DB.VenderUsers.AddRange(ls.ToArray()); - } - } - } - if (DB.SaveChanges() != -1) - { - try - { - var user1 = DB.Users.Where(p => p.Name == _username).FirstOrDefault(); - var _factory = CurrentUser.FactoryList.FirstOrDefault(); - var _f = DB.TA_FACTORY.Where(p => p.FactoryId == _factory).FirstOrDefault(); - int[] titleIDs = new int[] { _f.ID }; - user1.TA_FACTORY = new List(); - AddEntities(user1.TA_FACTORY, titleIDs); - if(DB.SaveChanges()!=-1) - { - Alert.Show("供应商账号初始化成功"); - lbName.Text = "生成账号:" +ddl_Vender.SelectedValue + "@" + CurrentUser.FactoryList.FirstOrDefault(); - return; - } - } - catch (Exception ex) - { - Alert.Show(ex.Message); - return; - } - } - } - catch (Exception ex) - { - Alert.Show(ex.Message); - return; - } - } - } - catch (Exception ex) - { - Alert.Show(ex.Message); - } - - - } - } -} \ No newline at end of file diff --git a/SCP/Views/PlanData/MakeSupplierAccount.aspx.designer.cs b/SCP/Views/PlanData/MakeSupplierAccount.aspx.designer.cs deleted file mode 100644 index a3abb92..0000000 --- a/SCP/Views/PlanData/MakeSupplierAccount.aspx.designer.cs +++ /dev/null @@ -1,78 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace SCP.Views.PlanData { - - - public partial class MakeSupplierAccount { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// Panel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Panel Panel1; - - /// - /// extForm1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Form extForm1; - - /// - /// ddl_Vender 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.DropDownList ddl_Vender; - - /// - /// TXT_PASSWORD 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.TextBox TXT_PASSWORD; - - /// - /// btnCreate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Button btnCreate; - - /// - /// lbName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUI.Label lbName; - } -} diff --git a/SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx b/SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx deleted file mode 100644 index 775813b..0000000 --- a/SCP/Views/PlanData/SCP_PLAN_DETAIL.aspx +++ /dev/null @@ -1,51 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SCP_PLAN_DETAIL.aspx.cs" Inherits="SCP.Views.SupplierData.SCP_PLAN_DETAIL" %> - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -