Ejemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string id = this.ReportID;
                XiuliInputInfo wInfo = new XiuliInputInfo();
                if (string.IsNullOrEmpty(id) == false)
                {
                    wInfo = new XiuliInput().GetByID(id);
                }

                wInfo.UsageType = rblUsage.SelectedValue;
                string reportTypeID = rblReportType.SelectedValue;
                if (string.IsNullOrEmpty(reportTypeID))
                {
                    ShowMsg("请选择报表类型。");
                    return;
                }
                wInfo.ReportTypeID = rblReportType.SelectedValue;
                wInfo.InputUserID = this.UserCacheInfo.ID;
                //wInfo.总数 = tb总数.Text;

                string year = ddlReportYear.SelectedValue;
                string month = ddlReportMonth.SelectedValue;
                string dimTimeID = new DimTime().GetIDByMonth(year, month);
                wInfo.DimTimeID = dimTimeID;
                wInfo.ShipID = ddlShip.SelectedValue;
                wInfo.CurrencyID = ddlCurrency.SelectedValue;
                wInfo.ExchangeRateID = this.RateID;

                wInfo.备件 = tb备件.Text;
                wInfo.修理费用 = tb修理费用.Text;
                wInfo.服务工程 = tb服务工程.Text;
                wInfo.甲板工程 = tb甲板工程.Text;
                wInfo.轮机工程 = tb轮机工程.Text;
                wInfo.电气工程 = tb电气工程.Text;
                wInfo.自购物料 = tb自购物料.Text;
                if (string.IsNullOrEmpty(id) == true)
                {
                    this.ReportID = new XiuliInput().Add(wInfo);
                }
                else
                {
                    new XiuliInput().Update(wInfo);
                }
                tb总数.Text = wInfo.总数;
                ShowMsg("修理报表保存成功。");
            }
            catch (ArgumentNullException aex)
            {
                ShowMsg(aex.Message);
            }
            catch (Exception ex)
            {
                ShowMsg(ex.Message);
                Log(ex);
            }
        }
Ejemplo n.º 2
0
        private void BindList(int pageIndex, int pageSize)
        {
            string dateID = MonthAndShipNavigate1.DateID;
            string shipID = MonthAndShipNavigate1.ShipID;

            DataSet ds = new XiuliInput().GetList(dateID, shipID, this.ReportTypeID, pageSize, pageIndex);
            gvXiuliList.DataSource = ds;
            gvXiuliList.DataBind();
            CustomDataSet cDS = ds as CustomDataSet;
            if (cDS == null)
            {
                pGrid.TotalAmout = 0;
                return;
            }
            pGrid.TotalAmout = cDS.TotalAmout;
        }
Ejemplo n.º 3
0
        private void SetPageValue(string id)
        {
            XiuliInputInfo wInfo = new XiuliInput().GetByID(id);
            DimTimeInfo dInfo = new DimTime().GetDimTimeInfo(wInfo.DimTimeID);
            tbUserName.Text = this.UserCacheInfo.Name;
            tbCreateTime.Text = wInfo.CreateTime.ToShortDateString();

            rblReportType.Items.FindByValue(wInfo.ReportTypeID).Selected = true;
            rblUsage.Items.FindByValue(wInfo.UsageType).Selected = true;
            ddlShip.SelectedItem.Selected = false;
            ddlCurrency.SelectedItem.Selected = false;
            ddlYear.SelectedItem.Selected = false;
            ddlMonth.SelectedItem.Selected = false;
            ddlShip.Items.FindByValue(wInfo.ShipID).Selected = true;
            ddlCurrency.Items.FindByValue(wInfo.CurrencyID).Selected = true;
            ddlYear.Items.FindByValue(dInfo.Year.ToString()).Selected = true;
            ddlMonth.Items.FindByValue(dInfo.MonthNumOfYear.ToString()).Selected = true;

            ddlReportMonth.SelectedValue = dInfo.MonthNumOfYear.ToString();
            ddlReportYear.SelectedValue = dInfo.Year.ToString();
            tb总数.Text = wInfo.总数;

            tb备件.Text = wInfo.备件;
            tb修理费用.Text = wInfo.修理费用;
            tb服务工程.Text = wInfo.服务工程;
            tb甲板工程.Text = wInfo.甲板工程;
            tb轮机工程.Text = wInfo.轮机工程;
            tb电气工程.Text = wInfo.电气工程;
            tb自购物料.Text = wInfo.自购物料;
            InvoiceList1.KeyID = id;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 绑定物料报表
 /// </summary>
 private void BindList()
 {
     string year = rblYear.SelectedValue;
     string shipID = rblShip.SelectedValue;
     DataSet ds = new XiuliInput().GetCountStatictis(year, shipID);
     gvXiuliList.DataSource = ds;
     gvXiuliList.DataBind();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 绑定物料报表
 /// </summary>
 /// <param name="year">报表的年份,为空显示所有年份</param>
 /// <param name="shipID">报表对应的船舶,为空显示所有的船舶</param>
 private void BindList(string year, string shipID)
 {
     DataSet ds = new XiuliInput().GetCountStatictis(year, shipID);
     gvXiuliList.DataSource = ds;
     gvXiuliList.DataBind();
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 绑定物料报表
 /// </summary>
 /// <param name="year">报表的年份,为空显示所有年份</param>
 /// <param name="QuarterID">报表对应的季度,为空显示所有的季度</param>
 private void BindList(string year, string quarter)
 {
     DataSet ds = new XiuliInput().GetSumStatictis(year, quarter);
     gvXiuliList.DataSource = ds;
     gvXiuliList.DataBind();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 绑定物料报表
 /// </summary>
 private void BindList()
 {
     string year = rblYear.SelectedValue;
     string quarter = rblQuarter.SelectedValue;
     DataSet ds = new XiuliInput().GetSumStatictis(year, quarter);
     gvXiuliList.DataSource = ds;
     gvXiuliList.DataBind();
 }