Ejemplo n.º 1
0
 /// <summary>
 /// 修改行项选中状态
 /// </summary>
 private void setCheck()
 {
     foreach (ListViewRow Row in listCons.Rows)
     {
         frmConSOROutboundLayout Layout = Row.Control as frmConSOROutboundLayout;
         Layout.setCheck(Checkall.Checked);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 全选框更新
        /// </summary>
        internal void upCheckState()
        {
            Int32 selectQty = 0;        //当前选择行项数

            foreach (ListViewRow Row in listCons.Rows)
            {
                frmConSOROutboundLayout Layout = Row.Control as frmConSOROutboundLayout;
                selectQty += Layout.checkNum();
            }
            if (selectQty == listCons.Rows.Count)
            {
                Checkall.Checked = true;          //选中所有行项时
            }
            else
            {
                Checkall.Checked = false;        //没有选中所有行项
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 出库提交
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSave_Press(object sender, EventArgs e)
 {
     try
     {
         List <ConSalesOrderRowInputDto> Rows = new List <ConSalesOrderRowInputDto>();
         foreach (ListViewRow row in listCons.Rows)
         {
             frmConSOROutboundLayout Layout = row.Control as frmConSOROutboundLayout;
             if (Layout.getData() != null)
             {
                 Rows.Add(Layout.getData());   //添加入库信息
             }
         }
         if (Rows.Count == 0)
         {
             throw new Exception("请选择退库耗材!");
         }
         ConSOOutboundInputDto outInputDto = new ConSOOutboundInputDto();
         outInputDto.SOID       = SOID;
         outInputDto.CREATEUSER = Client.Session["UserID"].ToString();
         outInputDto.RowDatas   = Rows;
         ReturnInfo RInfo = autofacConfig.ConSalesOrderService.OutboundConSalesOrder(outInputDto);
         if (RInfo.IsSuccess)
         {
             List <ConSalesOrderOutboundOutputDto> rows = autofacConfig.ConSalesOrderService.GetOutRowsBySOID(SOID);
             if (rows.Count == 0)
             {
                 Toast("该销售单出库完成!");
                 Form.Close();
             }
             else
             {
                 Toast("出库成功!");
                 Bind();         //刷新当前页面入库数据
                 Checkall.Checked = false;
             }
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }