<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="T_Hr_WageModifyOrEdit.aspx.cs" Inherits="XYYC.DSS.Web.T_Hr_Wage.T_Hr_WageModifyOrEdit" %>
<%@ Register Assembly="C1.Web.Wijmo.Controls.3" Namespace="C1.Web.Wijmo.Controls.C1Input" TagPrefix="wijmo" %>
<%@ Register Assembly="C1.Web.Wijmo.Controls.3" Namespace="C1.Web.Wijmo.Controls.C1GridView" TagPrefix="wijmo" %>
<%@ Register Assembly="C1.Web.Wijmo.Controls.3" Namespace="C1.Web.Wijmo.Controls.C1Calendar" TagPrefix="wijmo" %>
<%@ Register Assembly="C1.Web.Wijmo.Controls.3" Namespace="C1.Web.Wijmo.Controls.C1ComboBox" TagPrefix="wijmo" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script src="../res/js/jquery.min.js"></script>
<script src="../res/js/jquery.js"></script>
<script src="../JS/My97DatePicker/WdatePicker.js"></script>
<style>
</style>
<script type="text/javascript">
var num = 0;
var json="";
var dv;
$(document).ready(function () {
$.post("../Ajax/PostJson.aspx", {}, function (Rvar) {
json = Rvar;
dv = $.wijmo.wijdataview(json);
});
})
function afterCellEdit(e, args) {
var data = $("#cgv1").c1gridview("data");
switch (args.cell.column().dataField) {
case "Post_Wage":
case "Merit_Pay":
case "Back_Pay":
case "Travel_Pay":
case "Duty_Pay":
case "Other_Pay":
case "Award_Pay":
data[args.cell._ri][13] = data[args.cell._ri][13] + (args.cell.value() - num);
data[args.cell._ri][27] = data[args.cell._ri][13] - data[args.cell._ri][26];
break;
case "Pension_Tax":
case "Medical_Tax":
case "Unemployment_Tax":
case "Provident_Tax":
case "Enterprise_Tax":
case "Utilities_Tax":
case "Security_Tax":
case "Monthly_Tax":
case "Individual_Tax":
case "Other_Tax":
case "Buckle_Tax":
data[args.cell._ri][26] = data[args.cell._ri][26] + (args.cell.value() - num);
data[args.cell._ri][27] = data[args.cell._ri][13] - data[args.cell._ri][26];
break;
}
$("#cgv1").c1gridview({ allowEditing: true });
}
function beforeCellEdit(e, args) {
switch (args.cell.column().dataField) {
case "Post_Wage":
case "Merit_Pay":
case "Back_Pay":
case "Travel_Pay":
case "Duty_Pay":
case "Other_Pay":
case "Award_Pay":
case "Pension_Tax":
case "Medical_Tax":
case "Unemployment_Tax":
case "Provident_Tax":
case "Enterprise_Tax":
case "Utilities_Tax":
case "Security_Tax":
case "Monthly_Tax":
case "Individual_Tax":
case "Other_Tax":
case "Buckle_Tax":
$("<input />")
.width("100%")
.appendTo(args.cell.container().empty())
.wijinputnumber({
value: args.cell.value(),
minValue: 0,
});
args.handled = true;
break;
case "Post":
$("<input />")
.wijcombobox({
data: dv,
selectedValue: args.cell.value(),
});
}
num = args.cell.value();
}
|
|