protected void Button1_Click(object sender, EventArgs e) { Model.H_Clerk clerk = new Model.H_Clerk(); clerk.id = int.Parse(Request.QueryString["pid"]); clerk.name = this.TextName.Value.Trim(); clerk.username = H_ClerkClass.GetModel(Request.QueryString["pid"].ToString()).username; clerk.phone = this.TextPhone.Value.Trim(); clerk.TeamViewerID = this.TextTeamViewerID.Value.Trim(); clerk.telphone = this.TextTel.Value.Trim(); clerk.zhifubao = this.TextZhifubao.Value.Trim(); clerk.bank_region = this.TextBank.Value.Trim(); clerk.bank_name = this.TextBank_name.Value.Trim(); clerk.bank_number = this.TextBank_number.Value.Trim(); clerk.region_province = this.HiddenProvince.Value.ToString(); clerk.region_city = this.HiddenCity.Value.ToString(); clerk.region_county = this.HiddenArea.Value.ToString(); if (H_ClerkClass.Update(clerk)) { JScript.AlertAndRedirect("操作成功!", "ClerkList.aspx", this); } else { JScript.Alert("操作失败!", "a2", this); } }
protected void btnConfirm_Click(object sender, EventArgs e) { if (txtConfirmPWD.Text != txtConfirmPWD.Text) { JScript.Alert("新密码和确认密码不一致!", this); return; } Userdata newUser = new Userdata(); newUser = Userdata.getUserInfo(txtUserID.Text); if (newUser.ID != null) { if (newUser.Pwd != txtOriginalPWD.Text) { JScript.Alert("原始密码错误", this); return; } int result = Userdata.ChangePWD(txtUserID.Text, txtNewPWD.Text); if (result > 0) { JScript.AlertAndRedirect("密码修改成功!", "../Index.aspx", this); } } else { JScript.Alert("用户不存在", this); return; } }
protected void btnSaveClose_Click(object sender, EventArgs e) { string res = CRUD.updateFilmLevel(txtFilmLevel.Text, ddlFilmLevel.SelectedValue, txtLotID.Text, System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString(), "质量评审"); if (res == "success") { JScript.AlertAndRedirect("更改成功!", "../QC/FQCAction.aspx", this); } }
protected void ModifyMyPassword_Click(object sender, EventArgs e) { if (OldPsd_TextBox.Text == "" || NewPsd_TextBox.Text == "") { JScript.Alert("输入不完整,请检查后再提交。", this); return; } if (NewPsd_TextBox.Text != NewPsdRe_TextBox.Text) { JScript.Alert("两次密码输入不同,请重新输入。", this); return; } if (NewPsd_TextBox.Text.Length < 6) { JScript.Alert("密码至少应为6个字符。", this); return; } string md5Password = MD5Provider.Hash(OldPsd_TextBox.Text); string strConnection = ConfigurationManager.ConnectionStrings["AccessConnectionString"].ConnectionString; OleDbConnection objConnection = new OleDbConnection(strConnection); objConnection.Open(); using (objConnection) { string strSQL = "SELECT Top 1 * FROM YHTable WHERE YHName = @userName"; OleDbCommand command = new OleDbCommand(strSQL, objConnection); command.Parameters.Add("@userName", OleDbType.VarChar).Value = Session["userName"].ToString(); OleDbDataAdapter adapter = new OleDbDataAdapter(command); DataTable dt = new DataTable(); adapter.Fill(dt); if (dt.Rows.Count == 1) { if (dt.Rows[0]["YHPassword"].ToString() == md5Password) { strSQL = "UPDATE YHTable SET YHPassword=@psw WHERE 编号=" + dt.Rows[0]["编号"].ToString(); command = new OleDbCommand(strSQL, objConnection); command.Parameters.Add("@psw", OleDbType.VarChar).Value = MD5Provider.Hash(NewPsd_TextBox.Text); command.ExecuteNonQuery(); MyBasePage.writeLog(Session["userName"].ToString(), "修改密码成功"); JScript.Alert("密码修改成功", this); } else { MyBasePage.writeLog(Session["userName"].ToString(), "修改密码错误:旧密码输入错误"); JScript.Alert("密码修改失败:旧密码输入错误", this); } } else { MyBasePage.writeLog(Session["userName"].ToString(), "修改密码错误:无法在数据库中检索到用户原始信息"); MyBasePage.logout(this); JScript.AlertAndRedirect("系统出现错误,请重新登录后再试", "../Deafult.aspx", this); } } }
/// <summary> /// 修改公告信息 /// </summary> /// <param name="afficheInf">公告实体</param> /// <returns></returns> public void UpdateAffiche(AfficheInf afficheInf) { if (affiche.UpdateAffiche(afficheInf) == false) { JScript.Alert("修改公告信息失败!"); } else { JScript.AlertAndRedirect("修改公告信息成功!", "Default.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (Common.TypeID() != 3 && Common.TypeID() != 4) { //ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script>alert('');</script>"); //Session.Remove("UserModel"); Session["UserModel"] = null; Session.Clear(); Session.Abandon(); Response.Clear(); JScript.AlertAndRedirect("您不是商家用户,或已登录平台,请查看!", "../index.aspx"); } if (Session["UserModel"] is LoginModel) { LoginModel model = Session["UserModel"] as LoginModel; if (model != null) { //获得用户类型 Hi.Model.SYS_Users User = new Hi.BLL.SYS_Users().GetModel(model.UserID); if (User != null && Common.HasAdminRole(User.ID)) { if (Request["main"] != null) { if (Request["main"].ToString() == "11") { mainstr = "Order/OrderCreateList.aspx"; } else if (Request["main"].ToString() == "12") { mainstr = "Report/CompCollection.aspx"; } else if (Request["main"].ToString() == "13") { mainstr = "Order/OrderShipList.aspx"; } else if (Request["main"].ToString() == "14") { mainstr = "SysManager/DisList.aspx"; } rightFrame.Attributes.Add("src", mainstr); } else { if (string.IsNullOrEmpty(Request["type"])) { mainstr = "jsc.aspx"; rightFrame.Attributes.Add("src", mainstr); } } } } } }
/// <summary> /// 删除公告信息 /// </summary> /// <param name="af_Id">公告编号</param> /// <param name="dp_Id">部门ID</param> /// <returns></returns> public void DelAffiche(int af_Id, string dp_Id) { int int_reault = affiche.DelAffiche(af_Id, dp_Id); if (int_reault == -1) { JScript.AlertAndRedirect("你没有权限!删除其他部门的公告信息.", "Default.aspx"); } if (int_reault == 0) { JScript.AlertAndRedirect("公告信息删除失败,请重试!", "Default.aspx"); } }
public void NotChooseCourse(string st_Id, int pc_Id, string LearnYear, int LearnTerm) { int result = course.NotChooseCourse(st_Id, pc_Id, LearnYear, LearnTerm); switch (result) { case 1: JScript.AlertAndRedirect("退选成功!", "ChooseCourse.aspx"); break; case -1: JScript.AlertAndRedirect("退选失败!", "ChooseCourse.aspx"); break; } }
protected void btnAddStudent_Click(object sender, EventArgs e) { try { birthday = Convert.ToDateTime(txtBirthday.Text); StudentInf studentInf = new StudentInf(txtStudentNumber.Text, ddlClass.SelectedValue, txtStudentName.Text, ddlSex.SelectedItem.Value, birthday, txtIdentity.Text, txtTel.Text, ddlProvince.SelectedValue, ddlStuFace.SelectedItem.Text, ddlMingZu.SelectedValue, txtHomeAddress.Text, txtRemark.Text); student.AddStudent(studentInf); } catch { JScript.AlertAndRedirect("日期格式错误!", "AddStudent.aspx"); } }
public int Fanli = 0; //是否启用返利 protected void Page_Load(object sender, EventArgs e) { object obj = Request["action"]; if (obj != null) { if (obj.ToString() == "dislist") { string compid = Request["compId"] + ""; string disid = Request["disId"] + ""; Response.Write(disBing(compid, disid)); Response.End(); } } if (!IsPostBack) { DataTable dt = Common.BindDisList(this.CompID.ToString());//代理商绑定 if (dt != null) { this.rptDisList.DataSource = dt; this.rptDisList.DataBind(); } this.hidType2.Value = Request.QueryString["type"] + "";//2 再次购买 this.hidKeyId.Value = KeyID.ToString(); this.hidCompId.Value = this.CompID.ToString(); Fanli = OrderInfoType.rdoOrderAudit("订单支付返利是否启用", CompID).ToInt(0); this.hidFanl.Value = Fanli.ToString(); //是否启用返利 IsInve = OrderInfoType.rdoOrderAudit("商品是否启用库存", CompID).ToInt(0); //是否启用库存 //代理商列表 List <Hi.Model.BD_Distributor> list = new Hi.BLL.BD_Distributor().GetList("ID,DisName", "isnull(dr,0)=0 and compid=" + this.CompID, ""); this.divDisList.InnerText = ConvertJson.ToJson(Common.FillDataTable(list)); if (KeyID != 0) { if (Request.QueryString["type"] + "" != "2") { Hi.Model.DIS_Order model = new Hi.BLL.DIS_Order().GetModel(KeyID); //判断订单是否可以修改 企业下单订单已审未支付,代理商下单企业不能修改 if (model.OState > (int)Enums.OrderState.待审核) { JScript.AlertAndRedirect("订单已被其他人修改,请刷新后再重新操作!", "orderdetail.aspx?top=1&KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey)); return; } } else { this.hidType.Value = Request.QueryString["type"] + ""; } Bind(); } } }
protected void MarkAllReaded(object sender, EventArgs e) { string strConnection = ConfigurationManager.ConnectionStrings["AccessConnectionString"].ConnectionString; OleDbConnection objConnection = new OleDbConnection(strConnection); objConnection.Open(); using (objConnection) { String strSQL = "UPDATE LYTable SET LYRead=true"; OleDbCommand command = new OleDbCommand(strSQL, objConnection); command.ExecuteNonQuery(); } JScript.AlertAndRedirect("已全部标记为已读", "", this); }
protected void Article_Insert(object sender, EventArgs e) { if (productNameTextBox.Text == "") { JScript.Alert("请输入明星产品名称", this); return; } if (picURLTextBox.Text == "") { JScript.Alert("请输入产品图片地址", this); return; } int nindex; if (!int.TryParse(posIndexTextBox.Text, out nindex)) { JScript.Alert("显示顺序必须为整数", this); return; } string strConnection = ConfigurationManager.ConnectionStrings["AccessConnectionString"].ConnectionString; OleDbConnection objConnection = new OleDbConnection(strConnection); objConnection.Open(); using (objConnection) { string strSQL = "INSERT INTO ProductsShowTable(ProductName,PicURL,Remarks,LinkURL,PosIndex,AltValue) values (@name,@picurl,@remarks,@linkURL,@posIndex,@altValue)"; OleDbCommand command = new OleDbCommand(strSQL, objConnection); command.Parameters.Add("@name", OleDbType.VarChar).Value = productNameTextBox.Text; command.Parameters.Add("@picurl", OleDbType.VarChar).Value = picURLTextBox.Text; command.Parameters.Add("@remarks", OleDbType.VarChar).Value = remarksTextBox.Text; command.Parameters.Add("@linkURL", OleDbType.VarChar).Value = linkURLTextBox.Text; command.Parameters.Add("@posIndex", OleDbType.Integer).Value = nindex; command.Parameters.Add("@altValue", OleDbType.VarChar).Value = altTextBox.Text; if (command.ExecuteNonQuery() > 0) { MyBasePage.writeLog(Session["userName"].ToString(), "添加明星产品,标题:" + productNameTextBox.Text); JScript.AlertAndRedirect("记录已添加", "", this); NewsListPanel.Visible = true; EditPanel.Visible = false; //ViewPanel.Visible = false; } else { MyBasePage.writeLog(Session["userName"].ToString(), "添加明星产品时发生错误,返回受影响数据库条数为零。欲添加标题: " + productNameTextBox.Text); JScript.AlertAndRedirect("添加数据库记录时发生错误", "", this); } } }
protected void btnAddAffiche_Click(object sender, EventArgs e) { try { af_EnableTime = Convert.ToDateTime(txtEnbaleTime.Text); afficheInf = new AfficheInf(HttpContext.Current.User.Identity.Name.ToString(), txtAfficheTitle.Text, txtAfficheContent.Text, af_EnableTime, "..\\AfficheFiles\\" + Get_Af_FileName()); affiche.Add_Affiche(afficheInf); UpLoadFile(); } catch { JScript.AlertAndRedirect("日期格式错误!", "AddAffiche.aspx"); } }
protected void btnSaveClose_Click(object sender, EventArgs e) { string result = ""; string ShipmentID = txtShipmentID.Text; //取消出货通知单绑定,待用户要求上线 modify by lei.xue on 2017-10-21 //if (ddlShipmentNotice.SelectedValue == "请选择单号") //{ // JScript.Alert("请选择出库通知单", this); // return; //} //获取出货单号 if (Shipment.ExistShipmentID(txtShipmentID.Text.Trim().ToString()) == "success") { JScript.Alert("输入的出库单号已经存在", this); return; } DataTable dt = (DataTable)ViewState["dt"]; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { result = Shipment.InsertShipmentInfo(ShipmentID , dt.Rows[i]["lotid"].ToString() , System.Web.HttpContext.Current.Request.Cookies["userID"].Value.ToString()); if (result == "fail") { JScript.Alert("出货出错!", this); return; } } //取消出货通知单绑定,待用户要求上线 modify by lei.xue on 2017-10-21 //把已出货的erp出货通知单状态更新成Y //if (Shipment.UpdateShipmentNoticeStatus("Y", ddlShipmentNotice.SelectedValue) != "success") //{ // JScript.Alert("erp出货通知单状态更新出错", this); // return; //} JScript.AlertAndRedirect("出货成功!", "../Warehouse/Shipment.aspx", this); } else { JScript.Alert("请先刷入条码!", this); } }
protected void Button1_Click(object sender, EventArgs e) { Model.H_Basic_Course basic_course = new Model.H_Basic_Course(); basic_course.id = int.Parse(Request.QueryString["pid"]); basic_course.basiccourse = this.TextBasicCourse.Value.Trim(); if (H_Basic_CourseClass.Update(basic_course)) { JScript.AlertAndRedirect("操作成功", "BasicCourseList.aspx", this); } else { JScript.AlertAndRedirect("操作失败", "a2", this); } }
protected void Button1_Click(object sender, EventArgs e) { Model.H_User user = new Model.H_User(); user.username = this.TextUser.Value.Trim(); user.qxid = int.Parse(this.SelectAuth.Value); user.password = this.TextPwd.Value.Trim(); user.isoccupy = 0; if (H_UserClass.Add(user)) { JScript.AlertAndRedirect("操作成功", "UserList.aspx", this); } else { JScript.Alert("操作失败", "a2", this); } }
protected void btnAddTeacher_Click(object sender, EventArgs e) { DateTime te_Birthday; DateTime te_Teachtime; try { te_Birthday = Convert.ToDateTime(txtBirthday.Text); te_Teachtime = Convert.ToDateTime(txtWorkTime.Text); TeacherInf teacherInf = new TeacherInf(txtTeacherNumber.Text, txtTeacherName.Text, ddlDepartment.SelectedValue, ddlSex.SelectedValue, txtIdentity.Text, txtSpeciality.Text, ddlXueLi.SelectedItem.Text, ddlZhiCheng.SelectedItem.Text, ddlFace.SelectedItem.Text, txtTel.Text, te_Birthday, te_Teachtime, txtHomeAddress.Text, ddlProvince.SelectedItem.Text, ddlMingZu.SelectedItem.Text, txtRemark.Text); teacher.AddTeacher(teacherInf); } catch { JScript.AlertAndRedirect("时间格式错误!请重新输入", "AddTeacher.aspx"); } }
protected void Article_Insert(object sender, EventArgs e) { if (titleTextBox.Text == "") { JScript.Alert("请输入标题", this); return; } int index; if (!int.TryParse(IndexTextBox.Text, out index)) { index = 100; JScript.Alert("显示顺序必须为整数", this); return; } string strConnection = ConfigurationManager.ConnectionStrings["AccessConnectionString"].ConnectionString; OleDbConnection objConnection = new OleDbConnection(strConnection); objConnection.Open(); using (objConnection) { string strSQL = "INSERT INTO LBTable(LBName,LBInf,LBHasChild,LBParentID,PosIndex) values (@title,@content,@hasChild,@parentID,@posIndex)"; OleDbCommand command = new OleDbCommand(strSQL, objConnection); command.Parameters.Add("@title", OleDbType.VarChar).Value = titleTextBox.Text; command.Parameters.Add("@content", OleDbType.VarChar).Value = contentTextBox.Text; command.Parameters.Add("@hasChild", OleDbType.Boolean).Value = hasChildCheckBox.Checked; command.Parameters.Add("@parentID", OleDbType.Integer).Value = parentIDDropDown.SelectedValue; command.Parameters.Add("@posIndex", OleDbType.Integer).Value = index; if (command.ExecuteNonQuery() > 0) { MyBasePage.writeLog(Session["userName"].ToString(), "添加产品类别,标题:" + titleTextBox.Text); JScript.AlertAndRedirect("类别已添加", "", this); NewsListPanel.Visible = true; EditPanel.Visible = false; } else { MyBasePage.writeLog(Session["userName"].ToString(), "添加产品类别时发生错误,返回受影响数据库条数为零。欲添加标题: " + titleTextBox.Text); JScript.AlertAndRedirect("添加类别时发生错误", "", this); } } }
/// <summary> /// 删除学院信息列表 /// </summary> /// <returns></returns> public void DeleteDept(string CurDp_ID, string dp_ID) { int returnMessage = department.DeleteDept(CurDp_ID, dp_ID); switch (returnMessage) { case -1: JScript.Alert("你没有权限删除学院或部门"); JScript.GoHistory(-1); break; case 1: JScript.AlertAndRedirect("删除成功!", "Colleges.aspx"); break; case 0: JScript.Alert("还有其它信息与学院关联,请删除与该学院相关联的其它信息后再删除该学院"); JScript.GoHistory(-1); break; } }
public void AddTeacher(TeacherInf teacherInf) { int result = teacher.AddTeacher(teacherInf); switch (result) { case 1: JScript.AlertAndRedirect("添加成功!", "AddTeacher.aspx"); break; case 0: JScript.Alert("添加失败!请重试!"); JScript.GoHistory(-1); break; case -2: JScript.Alert("教师编号已存在,请换其他编号"); JScript.GoHistory(-1); break; } }
/// <summary> /// 删除课程库课程 /// </summary> /// <returns></returns> public void DeleteCourseLib(string CurDp_ID, string cb_ID) { int returnMessage = department.DeleteCourseLib(CurDp_ID, cb_ID); switch (returnMessage) { case -1: JScript.Alert("你没有权限删除该课程"); JScript.GoHistory(-1); break; case 1: JScript.AlertAndRedirect("删除成功!", "Courses.aspx"); break; case 0: JScript.Alert("还有其它信息与该课程关联,请删除与该课程关联的其它信息后再删除该课程"); JScript.GoHistory(-1); break; } }
/// <summary> /// 添加部门信息(包括学生信息) /// </summary> /// <param name="dept">部门信息</param> /// <returns></returns> public void AddDept(DepartmentInf dept) { int returnMessage = department.AddDept(dept); switch (returnMessage) { case -1: JScript.Alert("该学院编号存在"); JScript.GoHistory(-1); break; case 1: JScript.AlertAndRedirect("添加成功!", "Default.aspx"); break; case 0: JScript.Alert("添加失败,请重试!"); JScript.GoHistory(-1); break; } }
/// <summary> /// 发表公告信息 /// </summary> /// <param name="afficheInf">公告实体</param> public void Add_Affiche(AfficheInf afficheInf) { if (afficheInf.Af_EnableTime < DateTime.Now) { JScript.Alert("输入的有效日期小于了现在日期!"); } else { if (affiche.AddAffiche(afficheInf) == false) { JScript.AlertAndRedirect("发表公告失败!", "AddAffiche.aspx"); } else { JScript.AlertAndRedirect("发表公告成功!", "AddAffiche.aspx"); } } }
public void AddClass(ClassInf classInf) { int result = stuClass.AddClass(classInf); switch (result) { case 1: JScript.AlertAndRedirect("添加班级成功!", "AddClass.aspx"); break; case 0: JScript.Alert("添加失败,请检查输入!"); JScript.GoHistory(-1); break; case -2: JScript.Alert("班级编号重复请换其他班级编号!"); JScript.GoHistory(-1); break; } }
public void AddStudent(StudentInf studentInf) { int result = student.AddStudent(studentInf); switch (result) { case 1: JScript.AlertAndRedirect("添加学生成功!", "AddStudent.aspx"); break; case -2: JScript.Alert("添加失败,该学号已经存在,请换其他学号"); JScript.GoHistory(-1); break; case 0: JScript.Alert("添加失败,请仔细检查输入!"); JScript.GoHistory(-1); break; } }
/// <summary> /// 删除专业 /// </summary> /// <returns></returns> public void DeleteSP(string CurDp_ID, string sp_ID) { int returnMessage = department.DeleteSP(CurDp_ID, sp_ID); switch (returnMessage) { case -1: JScript.Alert("你没有权限删除该专业"); JScript.GoHistory(-1); break; case 1: JScript.AlertAndRedirect("删除成功!", "Specialities.aspx"); break; case 0: JScript.Alert("还有其它信息与该专业关联,请删除与该专业相关联的其它信息后在删除该学院"); JScript.GoHistory(-1); break; } }
protected void Article_Insert(object sender, EventArgs e) { if (titleTextBox.Text == "") { JScript.Alert("请输入文章标题", this); return; } if (contentTextBox.Text == "") { JScript.Alert("请输入文章内容", this); return; } string strConnection = ConfigurationManager.ConnectionStrings["AccessConnectionString"].ConnectionString; OleDbConnection objConnection = new OleDbConnection(strConnection); objConnection.Open(); using (objConnection) { string strSQL = "INSERT INTO XWTable(newsTitle,newsContents,isTop) values (@title,@content,@isTop)"; OleDbCommand command = new OleDbCommand(strSQL, objConnection); command.Parameters.Add("@title", OleDbType.VarChar).Value = titleTextBox.Text; command.Parameters.Add("@content", OleDbType.VarChar).Value = contentTextBox.Text; //command.Parameters.Add("@addTime", OleDbType.DBDate).Value = DateTime.Now; //command.Parameters.Add("@picURL", OleDbType.VarChar).Value = Txt_newsPicURL.Text; command.Parameters.Add("@isTop", OleDbType.Boolean).Value = isTopCheckBox.Checked; if (command.ExecuteNonQuery() > 0) { MyBasePage.writeLog(Session["userName"].ToString(), "添加新闻或通知,标题:" + titleTextBox.Text); JScript.AlertAndRedirect("新闻或通知已添加", "", this); NewsListPanel.Visible = true; EditPanel.Visible = false; ViewPanel.Visible = false; } else { MyBasePage.writeLog(Session["userName"].ToString(), "添加新闻或通知时发生错误,返回受影响数据库条数为零。欲添加标题: " + titleTextBox.Text); JScript.AlertAndRedirect("添加新闻或通知时发生错误", "", this); } } }
public void ChooseCourse(string st_Id, int pc_Id, string LearnYear, int LearnTerm, string te_id) { int result = course.ChooseCourse(st_Id, pc_Id, LearnYear, LearnTerm, te_id); switch (result) { case 1: JScript.AlertAndRedirect("选课成功!", "ChooseCourse.aspx"); break; case -2: JScript.AlertAndRedirect("已经选了该课程了!", "ChooseCourse.aspx"); break; case -1: JScript.AlertAndRedirect("超出人数限制了!", "ChooseCourse.aspx"); break; case 0: JScript.AlertAndRedirect("选课失败!", "ChooseCourse.aspx"); break; } }
protected void btnReset_Click(object sender, EventArgs e) { DataTable dt = (DataTable)ViewState["dt"]; if (dt.Rows.Count == 0) { return; } string result = ShipmentManage.ConfirmShipment(ViewState["shipmentid"].ToString()); if (result == "success") { JScript.AlertAndRedirect("最终出库成功", "ShipmentManage.aspx", this); } else { JScript.Alert("出库失败", this); } }
protected void Button1_Click(object sender, EventArgs e) { Model.H_Detail_Course detail_course = new Model.H_Detail_Course(); detail_course.subordinate_course_id = int.Parse(pid); detail_course.course_name = this.TextDetailCourse.Value.Trim(); detail_course.course_sel_price = double.Parse(this.TextSel_Price.Value.Trim()); detail_course.course_pur_price = double.Parse(this.TextPur_Price.Value.Trim()); detail_course.clerk_share = double.Parse(this.TextClerk_Share.Value.Trim()); detail_course.student_share = double.Parse(this.TextStudent_Share.Value.Trim()); detail_course.service_share = double.Parse(this.TextService_Share.Value.Trim()); if (H_Detail_CourseClass.Add(detail_course)) { JScript.AlertAndRedirect("操作成功", "DetailCourseList.aspx?pid=" + pid + "", this); } else { JScript.Alert("操作失败", "a2", this); } }