Exemplo n.º 1
0
    public virtual void EditSupplierLogistics(int IsAudit)
    {
        int      Supplier_Logistics_ID           = tools.CheckInt(Request.Form["Supplier_Logistics_ID"]);
        int      Supplier_Logistics_IsAudit      = IsAudit;
        DateTime Supplier_Logistics_AuditTime    = DateTime.Now;
        string   Supplier_Logistics_AuditRemarks = tools.CheckStr(Request.Form["Supplier_Logistics_AuditRemarks"]);


        SupplierLogisticsInfo entity = GetSupplierLogisticsByID(Supplier_Logistics_ID);

        if (entity != null)
        {
            entity.Supplier_Logistics_ID           = Supplier_Logistics_ID;
            entity.Supplier_Logistics_IsAudit      = Supplier_Logistics_IsAudit;
            entity.Supplier_Logistics_AuditTime    = Supplier_Logistics_AuditTime;
            entity.Supplier_Logistics_AuditRemarks = Supplier_Logistics_AuditRemarks;


            if (MyBLL.EditSupplierLogistics(entity, Public.GetUserPrivilege()))
            {
                Public.Msg("positive", "操作成功", "操作成功", true, "Supplier_Logistics_view.aspx?Supplier_Logistics_ID=" + Supplier_Logistics_ID);
            }
            else
            {
                Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
            }
        }
        else
        {
            Public.Msg("error", "错误信息", "操作失败,请稍后重试", false, "{back}");
        }
    }
Exemplo n.º 2
0
        public virtual bool EditSupplierLogistics(SupplierLogisticsInfo entity)
        {
            string    SqlAdd = null;
            DataTable DtAdd  = null;
            DataRow   DrAdd  = null;

            SqlAdd = "SELECT * FROM Supplier_Logistics WHERE Supplier_Logistics_ID = " + entity.Supplier_Logistics_ID;
            DtAdd  = DBHelper.Query(SqlAdd);
            try
            {
                if (DtAdd.Rows.Count > 0)
                {
                    DrAdd = DtAdd.Rows[0];
                    DrAdd["Supplier_Logistics_ID"]                 = entity.Supplier_Logistics_ID;
                    DrAdd["Supplier_SupplierID"]                   = entity.Supplier_SupplierID;
                    DrAdd["Supplier_OrdersID"]                     = entity.Supplier_OrdersID;
                    DrAdd["Supplier_LogisticsID"]                  = entity.Supplier_LogisticsID;
                    DrAdd["Supplier_Status"]                       = entity.Supplier_Status;
                    DrAdd["Supplier_Orders_Address_Country"]       = entity.Supplier_Orders_Address_Country;
                    DrAdd["Supplier_Orders_Address_State"]         = entity.Supplier_Orders_Address_State;
                    DrAdd["Supplier_Orders_Address_City"]          = entity.Supplier_Orders_Address_City;
                    DrAdd["Supplier_Orders_Address_County"]        = entity.Supplier_Orders_Address_County;
                    DrAdd["Supplier_Orders_Address_StreetAddress"] = entity.Supplier_Orders_Address_StreetAddress;
                    DrAdd["Supplier_Address_Country"]              = entity.Supplier_Address_Country;
                    DrAdd["Supplier_Address_State"]                = entity.Supplier_Address_State;
                    DrAdd["Supplier_Address_City"]                 = entity.Supplier_Address_City;
                    DrAdd["Supplier_Address_County"]               = entity.Supplier_Address_County;
                    DrAdd["Supplier_Address_StreetAddress"]        = entity.Supplier_Address_StreetAddress;
                    DrAdd["Supplier_Logistics_Name"]               = entity.Supplier_Logistics_Name;
                    DrAdd["Supplier_Logistics_Number"]             = entity.Supplier_Logistics_Number;
                    DrAdd["Supplier_Logistics_DeliveryTime"]       = entity.Supplier_Logistics_DeliveryTime;
                    DrAdd["Supplier_Logistics_IsAudit"]            = entity.Supplier_Logistics_IsAudit;
                    DrAdd["Supplier_Logistics_AuditTime"]          = entity.Supplier_Logistics_AuditTime;
                    DrAdd["Supplier_Logistics_AuditRemarks"]       = entity.Supplier_Logistics_AuditRemarks;
                    DrAdd["Supplier_Logistics_FinishTime"]         = entity.Supplier_Logistics_FinishTime;
                    DrAdd["Supplier_Logistics_TenderID"]           = entity.Supplier_Logistics_TenderID;
                    DrAdd["Supplier_Logistics_Price"]              = entity.Supplier_Logistics_Price;

                    DBHelper.SaveChanges(SqlAdd, DtAdd);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                DtAdd.Dispose();
            }
            return(true);
        }
Exemplo n.º 3
0
        public virtual SupplierLogisticsInfo GetSupplierLogisticsByID(int ID)
        {
            SupplierLogisticsInfo entity  = null;
            SqlDataReader         RdrList = null;

            try
            {
                string SqlList;
                SqlList = "SELECT * FROM Supplier_Logistics WHERE Supplier_Logistics_ID = " + ID;
                RdrList = DBHelper.ExecuteReader(SqlList);
                if (RdrList.Read())
                {
                    entity = new SupplierLogisticsInfo();

                    entity.Supplier_Logistics_ID                 = Tools.NullInt(RdrList["Supplier_Logistics_ID"]);
                    entity.Supplier_SupplierID                   = Tools.NullInt(RdrList["Supplier_SupplierID"]);
                    entity.Supplier_OrdersID                     = Tools.NullInt(RdrList["Supplier_OrdersID"]);
                    entity.Supplier_LogisticsID                  = Tools.NullInt(RdrList["Supplier_LogisticsID"]);
                    entity.Supplier_Status                       = Tools.NullInt(RdrList["Supplier_Status"]);
                    entity.Supplier_Orders_Address_Country       = Tools.NullStr(RdrList["Supplier_Orders_Address_Country"]);
                    entity.Supplier_Orders_Address_State         = Tools.NullStr(RdrList["Supplier_Orders_Address_State"]);
                    entity.Supplier_Orders_Address_City          = Tools.NullStr(RdrList["Supplier_Orders_Address_City"]);
                    entity.Supplier_Orders_Address_County        = Tools.NullStr(RdrList["Supplier_Orders_Address_County"]);
                    entity.Supplier_Orders_Address_StreetAddress = Tools.NullStr(RdrList["Supplier_Orders_Address_StreetAddress"]);
                    entity.Supplier_Address_Country              = Tools.NullStr(RdrList["Supplier_Address_Country"]);
                    entity.Supplier_Address_State                = Tools.NullStr(RdrList["Supplier_Address_State"]);
                    entity.Supplier_Address_City                 = Tools.NullStr(RdrList["Supplier_Address_City"]);
                    entity.Supplier_Address_County               = Tools.NullStr(RdrList["Supplier_Address_County"]);
                    entity.Supplier_Address_StreetAddress        = Tools.NullStr(RdrList["Supplier_Address_StreetAddress"]);
                    entity.Supplier_Logistics_Name               = Tools.NullStr(RdrList["Supplier_Logistics_Name"]);
                    entity.Supplier_Logistics_Number             = Tools.NullStr(RdrList["Supplier_Logistics_Number"]);
                    entity.Supplier_Logistics_DeliveryTime       = Tools.NullDate(RdrList["Supplier_Logistics_DeliveryTime"]);
                    entity.Supplier_Logistics_IsAudit            = Tools.NullInt(RdrList["Supplier_Logistics_IsAudit"]);
                    entity.Supplier_Logistics_AuditTime          = Tools.NullDate(RdrList["Supplier_Logistics_AuditTime"]);
                    entity.Supplier_Logistics_AuditRemarks       = Tools.NullStr(RdrList["Supplier_Logistics_AuditRemarks"]);
                    entity.Supplier_Logistics_FinishTime         = Tools.NullDate(RdrList["Supplier_Logistics_FinishTime"]);
                    entity.Supplier_Logistics_TenderID           = Tools.NullInt(RdrList["Supplier_Logistics_TenderID"]);
                    entity.Supplier_Logistics_Price              = Tools.NullDbl(RdrList["Supplier_Logistics_Price"]);
                }

                return(entity);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (RdrList != null)
                {
                    RdrList.Close();
                    RdrList = null;
                }
            }
        }
Exemplo n.º 4
0
 public virtual bool EditSupplierLogistics(SupplierLogisticsInfo entity, RBACUserInfo UserPrivilege)
 {
     if (RBAC.CheckPrivilege(UserPrivilege, "65632742-f14a-4e44-8f7d-64e56c866da4"))
     {
         return(MyDAL.EditSupplierLogistics(entity));
     }
     else
     {
         throw new TradePrivilegeException("没有权限,权限代码:65632742-f14a-4e44-8f7d-64e56c866da4错误");
     }
 }
Exemplo n.º 5
0
    public string SupplierLogisticsStatus(SupplierLogisticsInfo entity)
    {
        string Name = "--";

        if (entity != null)
        {
            if (entity.Supplier_Status == 0)
            {
                Name = "待发布";
            }
            else if (entity.Supplier_Status == 1)
            {
                if (entity.Supplier_Logistics_IsAudit == 0)
                {
                    Name = "待审核";
                }
                else if (entity.Supplier_Logistics_IsAudit == 1)
                {
                    if (entity.Supplier_LogisticsID == 0)
                    {
                        Name = "配货中";
                    }
                    else
                    {
                        Name = "已完成";
                    }
                }
                else
                {
                    Name = "审核不通过";
                }
            }
            else
            {
                Name = "已撤销";
            }
        }
        return(Name);
    }
Exemplo n.º 6
0
        public virtual IList <SupplierLogisticsInfo> GetSupplierLogisticss(QueryInfo Query)
        {
            int PageSize;
            int CurrentPage;
            IList <SupplierLogisticsInfo> entitys = null;
            SupplierLogisticsInfo         entity = null;
            string        SqlList, SqlField, SqlOrder, SqlParam, SqlTable;
            SqlDataReader RdrList = null;

            try
            {
                CurrentPage = Query.CurrentPage;
                PageSize    = Query.PageSize;
                SqlTable    = "Supplier_Logistics";
                SqlField    = "*";
                SqlParam    = DBHelper.GetSqlParam(Query.ParamInfos);
                SqlOrder    = DBHelper.GetSqlOrder(Query.OrderInfos);
                SqlList     = DBHelper.GetSqlPage(SqlTable, SqlField, SqlParam, SqlOrder, CurrentPage, PageSize);
                RdrList     = DBHelper.ExecuteReader(SqlList);
                if (RdrList.HasRows)
                {
                    entitys = new List <SupplierLogisticsInfo>();
                    while (RdrList.Read())
                    {
                        entity = new SupplierLogisticsInfo();
                        entity.Supplier_Logistics_ID                 = Tools.NullInt(RdrList["Supplier_Logistics_ID"]);
                        entity.Supplier_SupplierID                   = Tools.NullInt(RdrList["Supplier_SupplierID"]);
                        entity.Supplier_OrdersID                     = Tools.NullInt(RdrList["Supplier_OrdersID"]);
                        entity.Supplier_LogisticsID                  = Tools.NullInt(RdrList["Supplier_LogisticsID"]);
                        entity.Supplier_Status                       = Tools.NullInt(RdrList["Supplier_Status"]);
                        entity.Supplier_Orders_Address_Country       = Tools.NullStr(RdrList["Supplier_Orders_Address_Country"]);
                        entity.Supplier_Orders_Address_State         = Tools.NullStr(RdrList["Supplier_Orders_Address_State"]);
                        entity.Supplier_Orders_Address_City          = Tools.NullStr(RdrList["Supplier_Orders_Address_City"]);
                        entity.Supplier_Orders_Address_County        = Tools.NullStr(RdrList["Supplier_Orders_Address_County"]);
                        entity.Supplier_Orders_Address_StreetAddress = Tools.NullStr(RdrList["Supplier_Orders_Address_StreetAddress"]);
                        entity.Supplier_Address_Country              = Tools.NullStr(RdrList["Supplier_Address_Country"]);
                        entity.Supplier_Address_State                = Tools.NullStr(RdrList["Supplier_Address_State"]);
                        entity.Supplier_Address_City                 = Tools.NullStr(RdrList["Supplier_Address_City"]);
                        entity.Supplier_Address_County               = Tools.NullStr(RdrList["Supplier_Address_County"]);
                        entity.Supplier_Address_StreetAddress        = Tools.NullStr(RdrList["Supplier_Address_StreetAddress"]);
                        entity.Supplier_Logistics_Name               = Tools.NullStr(RdrList["Supplier_Logistics_Name"]);
                        entity.Supplier_Logistics_Number             = Tools.NullStr(RdrList["Supplier_Logistics_Number"]);
                        entity.Supplier_Logistics_DeliveryTime       = Tools.NullDate(RdrList["Supplier_Logistics_DeliveryTime"]);
                        entity.Supplier_Logistics_IsAudit            = Tools.NullInt(RdrList["Supplier_Logistics_IsAudit"]);
                        entity.Supplier_Logistics_AuditTime          = Tools.NullDate(RdrList["Supplier_Logistics_AuditTime"]);
                        entity.Supplier_Logistics_AuditRemarks       = Tools.NullStr(RdrList["Supplier_Logistics_AuditRemarks"]);
                        entity.Supplier_Logistics_FinishTime         = Tools.NullDate(RdrList["Supplier_Logistics_FinishTime"]);
                        entity.Supplier_Logistics_TenderID           = Tools.NullInt(RdrList["Supplier_Logistics_TenderID"]);
                        entity.Supplier_Logistics_Price              = Tools.NullDbl(RdrList["Supplier_Logistics_Price"]);

                        entitys.Add(entity);
                        entity = null;
                    }
                }
                return(entitys);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (RdrList != null)
                {
                    RdrList.Close();
                    RdrList = null;
                }
            }
        }
Exemplo n.º 7
0
 public virtual bool AddSupplierLogistics(SupplierLogisticsInfo entity)
 {
     return(MyDAL.AddSupplierLogistics(entity));
 }