Пример #1
0
        /// <summary>
        /// 获取当前用户在当前页面数据库对应的权限信息
        /// </summary>
        /// <returns></returns>
        public IList <PageAction> GetUserPageActionList(PageMenu pageMenu, UserData user)
        {
            var manager = AppBizFactory.CreateInstance <IPageActionManager>();
            var lst     = manager.GetUserPageActionList(pageMenu.ObjId, user.UserId);

            return(SspToPageAction(lst, pageMenu));
        }
Пример #2
0
 public string commandcolumn_direct_initpwd(string obj_id)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(obj_id))
         {
             return("编号不能为空!");
         }
         int    objid   = Convert.ToInt32(obj_id);
         var    encrypt = AppBizFactory.CreateInstance <IMcPassword>();
         string pwd     = encrypt.EncryptString("123", string.Empty, Encoding.ASCII);
         userManager.Update(new SsbUser()
         {
             UserPwd = pwd
         }, new SsbUser()
         {
             ObjId = objid
         });
         this.AppendWebLog("用户初始化", "ObjId=" + objid);
         pageToolBar.DoRefresh();
         this.winModify.Close();
         return("初始化登陆成功!");
     }
     catch (Exception ex)
     {
         return("初始化登陆失败!");
     }
 }
Пример #3
0
    private void IniPageFieldData()
    {
        //出库单号
        var billManager = AppBizFactory.CreateInstance <IOutputBillManager>();

        this.txtOrderNo.Text = "E" + billManager.GetNewBillNo();
    }
Пример #4
0
    public string IniPageFieldData()
    {
        //出库单号
        var billManager = AppBizFactory.CreateInstance <IOutputBillManager>();

        return("E" + billManager.GetNewBillNo());
    }
Пример #5
0
        private IMcUIManager getIMcUIManager()
        {
            string pluginName = this.ui.PluginName;
            var    dbMapper   = DbVersion.Instance.GetDbMapperByPluginName(pluginName);

            return(AppBizFactory.CreateInstance <IMcUIManager>(dbMapper.DbName));
        }
Пример #6
0
        /// <summary>
        /// 获取当前页面对应的菜单类
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public PageMenu GetPageMenu(string url)
        {
            var manager = AppBizFactory.CreateInstance <IPageMenuManager>();
            var lst     = manager.GetEntityList(new SspPageMenu()
            {
                PageUrl = url
            });
            var      sspPageMenu = lst.FirstOrDefault();
            PageMenu result      = null;

            if (sspPageMenu != null)
            {
                result            = new PageMenu();
                result.Permit     = 0;
                result.NeedPermit = 1;
                result.ObjId      = (int)sspPageMenu.ObjId;
                result.PageUrl    = sspPageMenu.PageUrl;
                result.ShowName   = sspPageMenu.ShowName;
                if (sspPageMenu.DeleteFlag == 1)
                {
                    result.NeedPermit = 0;
                    result.Permit     = 1;
                }
            }
            return(result);
        }
Пример #7
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ILoginLogManager loginLogManager = AppBizFactory.CreateInstance <ILoginLogManager>();

        #region 获取使用的数据版本(帐套)
        string version = this.ddlDbVersion.SelectedItem.Value;
        //保存当前用户使用的数据版本(帐套)
        Session["dbVersion"] = version;
        #endregion
        SsbUser currUser = new SsbUser();
        currUser.UserName = this.txtUserName.Text.Trim();
        currUser.UserPwd  = this.txtPassword.Text.Trim();
        currUser          = loginLogManager.Login(currUser);
        if (currUser != null)
        {
            //保存当前用户使用的数据版本(帐套)
            this.Data.User.UserId  = (int)currUser.ObjId;
            Session["MyReturnUrl"] = this.Request.Url.AbsolutePath;  //保存起始登录页的访问路径
            this.AppendWebLog("用户登陆成功", "UserId=" + this.Data.User.UserId);
            Response.Redirect("MainFrame.aspx");
        }
        else
        {
            this.cv.IsValid = false;
        }
    }
Пример #8
0
    private void IniPageBillFieldData()
    {
        var header = getModifyWbsOrder();

        this.txtOrderNo.Text = header.OrderNo;          //出库单号
        if (header.OrderStatus.Value == 0)              //单据状态
        {
            this.txtBillStatus.Text = "未执行";
        }
        if (header.OrderStatus.Value == 1)
        {
            this.txtBillStatus.Text = "出库中";
        }
        if (header.OrderStatus.Value == 2)
        {
            this.txtBillStatus.Text = "出库中";
        }
        if (header.OrderStatus.Value == 3)
        {
            this.txtBillStatus.Text = "已完成";
        }
        if (header.OrderStatus.Value > 3)
        {
            this.txtBillStatus.Text = "已取消";
        }
        //查询品级信息
        var      billManager = AppBizFactory.CreateInstance <IOutputBillManager>();
        PsbGrade grade       = new PsbGrade();

        setgrade(this.txtAddLineGrade, billManager.GetGradeTable(grade));
        this.txtAddLineGrade.SelectFirst();
        //行Guid
        var bill = getModifyWbsOrderLine();
    }
Пример #9
0
    public object GridPanelBindData(string action, Dictionary <string, object> extraParams)
    {
        PageResult pageResult = new PageResult();

        try
        {
            StoreRequestParameters prms = new StoreRequestParameters(extraParams);
            if (prms.Limit <= 0)
            {
                return(pageResult.Data);
            }
            pageResult.PageSize        = prms.Limit;
            pageResult.PageIndex       = prms.Page;
            pageResult.ParameterObject = createParameterObject();
            pageResult = AppBizFactory.CreateInstance <IOutputBillManager>().GetBillOutputData(pageResult);
        }
        catch (Exception ex)
        {
            X.MessageBox.Show(new MessageBoxConfig()
            {
                Title = "提示", Message = ex.Message.ToString(), Icon = MessageBox.Icon.WARNING
            });
        }
        return(pageResult.Data);
    }
Пример #10
0
    public object GridPanelBindData(string action, Dictionary <string, object> extraParams)
    {
        var manager = AppBizFactory.CreateInstance <IBinDataManager>();
        var data    = manager.GetProductStatistics();
        int total   = data.Rows.Count;

        return(new { data, total });
    }
Пример #11
0
 private void IniPageFieldData()
 {
     if (_.库位禁用.Permit == 0)
     {
         //this.btnBinDisable.Visible = false;
     }
     var manager  = AppBizFactory.CreateInstance <IBinDataManager>();
     var storData = manager.GetStoreBinData(99);
 }
Пример #12
0
        /// <summary>
        /// 获取当前页面数据库对应的权限信息
        /// </summary>
        /// <returns></returns>
        public IList <PageAction> GetPageActionList(PageMenu pageMenu)
        {
            var m = new SspPageAction();

            m.PageMenuId = pageMenu.ObjId;
            var manager = AppBizFactory.CreateInstance <IPageActionManager>();
            var lst     = manager.GetEntityList(m);

            return(SspToPageAction(lst, pageMenu));
        }
Пример #13
0
    //获取单据行Guid序列
    private WbsOrderLine getModifyWbsOrderLine()
    {
        var OrderNo = string.Empty;

        if (Request.QueryString["OrderNo"] != null)
        {
            OrderNo = Request.QueryString["OrderNo"].ToString();
        }
        var manager = AppBizFactory.CreateInstance <IOutputBillManager>();

        return(manager.GetWbsOrderLine(OrderNo));
    }
Пример #14
0
    private DataTable getListOutBillLineData()
    {
        var OrderNo = string.Empty;

        if (Request.QueryString["OrderNo"] != null)
        {
            OrderNo = Request.QueryString["OrderNo"].ToString();
        }
        var manager = AppBizFactory.CreateInstance <IOutputBillManager>();
        var result  = manager.GetListOutBillData(OrderNo);

        return(result);
    }
Пример #15
0
 public string DeleteBin(string binNo)
 {
     try
     {
         var manager = AppBizFactory.CreateInstance <IBinDataManager>();
         manager.DeleteBin(binNo);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
     return(string.Empty);
 }
Пример #16
0
 public string CreatOrder(string orderId, string orderNo, string binNo, string eLocNo)
 {
     try
     {
         var manager = AppBizFactory.CreateInstance <IBinDataManager>();
         manager.CreatOrder(orderId, orderNo, binNo, eLocNo);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
     return(string.Empty);
 }
Пример #17
0
 public string DeleteAgvTask(string taskNo)
 {
     try
     {
         var manager = AppBizFactory.CreateInstance <IAgvTaskManager>();
         manager.DeleteAgvTaskOnly(taskNo);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
     return(string.Empty);
 }
Пример #18
0
        /// <summary>
        /// 获取当前页面操作方法的ID
        /// </summary>
        /// <param name="sysPageMethod"></param>
        /// <returns></returns>
        private int AppendPageMethod(SspPageMethod sspPageMethod)
        {
            var manager = AppBizFactory.CreateInstance <IPageMethodManager>();
            int result  = getPageMethodId(sspPageMethod);

            if (result <= 0)
            {
                sspPageMethod.SeqIndex = sspPageMethod.ObjId;
                sspPageMethod.ShowName = "未知操作";
                manager.Insert(sspPageMethod);
                result = getPageMethodId(sspPageMethod);
            }
            return(result);
        }
Пример #19
0
 public string OutPutEquip(string typeNo)
 {
     try
     {
         var eqipzt = AppBizFactory.CreateInstance <IOutputBillManager>();
         var datas  = eqipzt.GetEquipData(typeNo);
         var result = McJsonConvert.SerializeObject(datas);
         return(result);
     }
     catch (Exception ex)
     {
     }
     return(string.Empty);
 }
Пример #20
0
    private void IniPageFieldData()
    {
        //出库单号
        var billManager = AppBizFactory.CreateInstance <IOutputBillManager>();

        this.txtOrderNo.Text = billManager.GetNewBillNo();
        //查询品级信息
        PsbGrade grade = new PsbGrade();

        setgrade(this.txtAddLineGrade, billManager.GetGradeTable(grade));
        this.txtAddLineGrade.SelectFirst();
        setgrade(this.txtModifyLineGrade, billManager.GetGradeTable(grade));
        this.txtModifyLineGrade.SelectFirst();
    }
Пример #21
0
        /// <summary>
        /// 获取当前页面操作方法的ID
        /// </summary>
        /// <param name="sysPageMethod"></param>
        /// <returns></returns>
        private int getPageMethodId(SspPageMethod sspPageMethod)
        {
            var manager = AppBizFactory.CreateInstance <IPageMethodManager>();
            var method  = new SspPageMethod();

            method.PageId     = sspPageMethod.PageId;
            method.MethodName = sspPageMethod.MethodName;
            IList <SspPageMethod> lst = manager.GetEntityList(method);

            if (lst.Count > 0)
            {
                return(Convert.ToInt32(lst[0].ObjId));
            }
            return(0);
        }
Пример #22
0
 public string RequestTaskCmd(string palletNo, string sLocNo)
 {
     if (string.IsNullOrEmpty(palletNo) || string.IsNullOrEmpty(sLocNo))
     {
         return("信息缺失");
     }
     try
     {
         var manager = AppBizFactory.CreateInstance <ITaskManager>();
         return(manager.RequestTaskCmd(palletNo, sLocNo));
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
Пример #23
0
    public string DeleteBillData(string OrderNo)
    {
        var manager = AppBizFactory.CreateInstance <IOutputBillManager>();

        try
        {
            manager.DeleteBillData(OrderNo);
            X.MessageBox.Alert("提示", "删除成功!").Show();
        }
        catch (Exception ex)
        {
            log.Error(ex);
            return(ex.Message);
        }
        return(string.Empty);
    }
Пример #24
0
 public string AddAgvTask(string palletId1, string sLocNo, string eLocNo)
 {
     try
     {
         var    manager   = AppBizFactory.CreateInstance <IAgvTaskManager>();
         string sLocPlcNo = manager.GetLocNo(sLocNo).LocPlcNo;
         string eLocPlcNo = manager.GetLocNo(eLocNo).LocPlcNo;
         string palletId  = palletId1;
         var    result    = manager.AddAgvTask(palletId, sLocNo, eLocNo, sLocPlcNo, eLocPlcNo);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
     return(string.Empty);
 }
Пример #25
0
 public string UpdateSrmArea(string CrnNo, string MinCol, string MaxCol)
 {
     try
     {
         if (int.Parse(MinCol) >= int.Parse(MaxCol))
         {
             return("堆垛机工作范围设置错误!");
         }
         var manager = AppBizFactory.CreateInstance <ICrnManager>();
         manager.UpdateSrmArea(CrnNo, MinCol, MaxCol);
         return(string.Empty);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
Пример #26
0
    public string SetBinUseFalg(string binNo, string useFlag)
    {
        var manager = AppBizFactory.CreateInstance <IBinDataManager>();
        var flag    = 0;

        int.TryParse(useFlag, out flag);
        if (flag == 0)
        {
            flag = 1;
        }
        else
        {
            flag = 0;
        }
        manager.ChanageBinUseFlag(binNo, flag);
        return(string.Empty);
    }
Пример #27
0
    public string SaveJsonInfo(string headerStr, string bodyStr)
    {
        if (string.IsNullOrWhiteSpace(headerStr))
        {
            return("请填写单据主信息!");
        }
        var headJson = McJsonConvert.McDeserializeObject(headerStr);

        if (headJson == null)
        {
            return("请填写单据主信息!");
        }
        if (string.IsNullOrWhiteSpace(bodyStr))
        {
            return("请填写单据行信息!");
        }
        var bodyJson = McJsonConvert.McDeserializeObjects(bodyStr);

        if (bodyJson == null)
        {
            return("请填写单据行信息!");
        }
        if (bodyJson.Length == 0)
        {
            return("请填写单据行信息!");
        }
        var header  = JsonToWbsOrder(headJson);
        var body    = JsonToWbsOrderLine(header, headJson, bodyJson);
        var manager = AppBizFactory.CreateInstance <IOutputBillManager>();

        try
        {
            var msg = manager.SaveOutputBill(header, body.ToArray());
            if (!string.IsNullOrWhiteSpace(msg))
            {
                return(msg);
            }
        }
        catch (Exception ex)
        {
            log.Error(ex);
            return(ex.Message);
        }
        return(string.Empty);
    }
Пример #28
0
    private void IniPageFieldData()
    {
        if (_.库位禁用.Permit == 0)
        {
            //this.btnBinDisable.Visible = false;
        }
        var manager  = AppBizFactory.CreateInstance <IBinDataManager>();
        var storData = manager.GetStoreBinData(99);
        var xCount   = storData.MaxBin.X;

        this.txtXCellBinNo.Items.Clear();
        for (int i = 1; i <= xCount; i++)
        {
            this.txtXCellBinNo.Items.Add(new Ext.Net.ListItem()
            {
                Text = "第【" + i.ToString() + "】行", Value = i.ToString()
            });
        }
    }
Пример #29
0
 public string ForceDeleteTask(string taskNo)
 {
     if (string.IsNullOrWhiteSpace(taskNo))
     {
         return("任务号不能为空!");
     }
     try
     {
         var manager = AppBizFactory.CreateInstance <ITaskManager>();
         if (manager.DeleteWbsTask(taskNo))
         {
             return(string.Empty);
         }
         return("取消失败");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }
Пример #30
0
 public string ForceDeleteCmd(string Objid)
 {
     if (string.IsNullOrWhiteSpace(Objid) || Objid.Equals("0"))
     {
         return("指令号不能为空!");
     }
     try
     {
         var manager = AppBizFactory.CreateInstance <ITaskManager>();
         if (manager.DeleteWbsTaskCmd(Objid))
         {
             return(string.Empty);
         }
         return("取消失败");
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }