Esempio n. 1
0
        public void GetPrintTb()
        {
            if (string.IsNullOrEmpty(this.txtsheet_no.Text))
            {
                throw new Exception("请选择单据!");
            }

            IBLL.IInOutBLL bll = new BLL.InOutBLL();
            DataTable      tb1;
            DataTable      tb2;

            bll.GetOtherInOut(this.txtsheet_no.Text, out tb1, out tb2);

            PrintForm.PrintHelper.tb_main   = tb1;
            PrintForm.PrintHelper.tb_detail = tb2;
        }
Esempio n. 2
0
        void IOrder.ShowOrder(string sheet_no)
        {
            try
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
                //
                RunType = 2;

                IBLL.IInOutBLL bll = new BLL.InOutBLL();
                DataTable      tb1;
                DataTable      tb2;
                bll.GetOtherInOut(sheet_no, out tb1, out tb2);
                //

                //
                var r1 = tb1.Rows[0];
                update_time   = Helper.Conv.ToDateTime(r1["update_time"]);
                this.sheet_no = sheet_no;
                if (r1["branch_no"].ToString() == "")
                {
                    txtbranch.Text = "";
                }
                else
                {
                    txtbranch.Text = r1["branch_no"].ToString() + "/" + r1["branch_name"].ToString();
                }
                txtsheet_no.Text  = r1["sheet_no"].ToString();
                txtoper_date.Text = Helper.Conv.ToDateTime(r1["oper_date"].ToString()).ToString("yyyy-MM-dd");
                if (r1["deal_man"].ToString() == "")
                {
                    txt_deal_man.Text = "";
                }
                else
                {
                    txt_deal_man.Text = r1["deal_man"].ToString() + "/" + r1["deal_man_name"].ToString();
                }
                if (r1["approve_man"].ToString() == "")
                {
                    txtapprove_man.Text = "";
                }
                else
                {
                    txtapprove_man.Text = r1["approve_man"].ToString() + "/" + r1["approve_man_name"].ToString();
                }
                if (r1["oper_id"].ToString() == "")
                {
                    txtoper_man.Text = "";
                }
                else
                {
                    txtoper_man.Text = r1["oper_id"] + "/" + r1["oper_name"];
                }

                txtapprove_date.Text = Helper.Conv.ToDateTime(r1["approve_date"]).ToString("yyyy-MM-dd");
                var trans_name = "";
                var trans_no   = r1["trans_no"].ToString();
                if (trans_no == "01")
                {
                    trans_name = "其它入库";
                }
                else if (trans_no == "02")
                {
                    trans_name = "归还";
                }
                else if (trans_no == "03")
                {
                    trans_name = "其它出库";
                }
                else if (trans_no == "04")
                {
                    trans_name = "领用出库";
                }
                else if (trans_no == "05")
                {
                    trans_name = "报损出库";
                }
                else if (trans_no == "06")
                {
                    trans_name = "借出";
                }
                else if (trans_no == "07")
                {
                    trans_name = "报溢入库";
                }
                else if (trans_no == "09")
                {
                    trans_name = "库存调整";
                }
                txt_trans_no.Text = trans_no + "/" + trans_name;
                txt_other3.Text   = r1["other3"].ToString();
                txt_old_no.Text   = r1["old_no"].ToString();
                //
                editGrid1.DataSource = tb2;

                Dictionary <string, object> dic = this.Tag as Dictionary <string, object>;
                this.Tag = Helper.Conv.ControlsAdds(this, dic);
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom("加载其它出入单异常[" + ex.Message + "]");
                Helper.LogHelper.writeLog("frmOtherInOutSheet->ShowOrder()", ex.ToString(), sheet_no);
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }