Exemplo n.º 1
0
 protected void pager_PageChanged(object sender, EventArgs e)
 {
     model = PageHelper.GetModel<KqmLeaveQryFormModel>(pnlContent.Controls);
     model.StatusCode = ddlStatus.SelectedValue;
     DataUIBind();
     this.txtBatchEmployeeNo.Text = "";
 }
Exemplo n.º 2
0
 protected void btnExport_Click(object sender, EventArgs e)
 {
     if (dt.Rows.Count != 0)
     {
         model = PageHelper.GetModel<KqmLeaveQryFormModel>(pnlContent.Controls);
         List<KqmLeaveQryFormModel> list = bllLeaveQry.GetModelList(dt);
         foreach (KqmLeaveQryFormModel modelList in list)
         {
             modelList.ThisLVTotal = Convert.ToDecimal(GetDeductLeaveTotal(model.ID, model.StartDate, model.EndDate, model.LVTotal.ToString()));
             modelList.LVTotalDays = Convert.ToDecimal(Convert.ToDouble(model.ThisLVTotal) / 8.0);
         }
         string[] header = { ControlText.gvDepName, ControlText.gvWorkNo, ControlText.gvLocalName, ControlText.gvLeaveType, ControlText.gvSTime, ControlText.gvETime, ControlText.gvLVTotal, ControlText.gvThisLVTotal, ControlText.gvLVTotalDays, ControlText.gvProxy, ControlText.gvReason, ControlText.gvApprover, ControlText.gvStatusName };
         string[] properties = { "DepName", "WorkNo", "LocalName", "LeaveType", "STime", "ETime", "LVTotal", "ThisLVTotal", "LVTotalDays", "Proxy", "Reason", "Approver", "StatusName" };
         string filePath = MapPath("~/ExportFileTemp/") + DateTime.Now.Ticks + ".xls";
         NPOIHelper.ExportExcel(list, header, properties, 5000, filePath);
         PageHelper.ReturnHTTPStream(filePath, true);
     }
     else
     {
         Page.ClientScript.RegisterStartupScript(GetType(), "show", "alert('" + Message.NoDataExport + "')", true);
     }
 }
Exemplo n.º 3
0
 protected void btnQuery_Click(object sender, EventArgs e)
 {
     model = PageHelper.GetModel<KqmLeaveQryFormModel>(pnlContent.Controls);
     model.StatusCode = ddlStatus.SelectedValue;
     pager.CurrentPageIndex = 1;
     DataUIBind();
     this.txtBatchEmployeeNo.Text = "";
 }