protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { WX.Model.EmployeeContract.MODEL model = WX.Model.EmployeeContract.NewDataModel(); model.Name.value = Path.GetFileNameWithoutExtension(FileUpload1.FileName); model.UserId.value = WX.Request.rUserId; model.ManageUserID.value = WX.Main.CurUser.UserID; model.Type.value = 0; if (FileUpload1.HasFile) { string filepath = "/UploadFiles/Contract/" + DateTime.Now.ToString("yyyyMMddhhmmssfff") + Path.GetExtension(FileUpload1.FileName); FileUpload1.SaveAs(Server.MapPath(filepath)); model.Annex.value = filepath; } model.Insert(); ContractBind(); }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { WX.Model.EmployeeContract.MODEL model = WX.Model.EmployeeContract.NewDataModel(e.CommandArgument); model.Delete(); ContractBind(); }