本文整理汇总了C#中HyoaClass.Hyoa_global.GetRandom方法的典型用法代码示例。如果您正苦于以下问题:C# HyoaClass.Hyoa_global.GetRandom方法的具体用法?C# HyoaClass.Hyoa_global.GetRandom怎么用?C# HyoaClass.Hyoa_global.GetRandom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HyoaClass.Hyoa_global
的用法示例。
在下文中一共展示了HyoaClass.Hyoa_global.GetRandom方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
string ls_tip = "保存成功!";
try
{
string[] lv_jsrsysname, lv_jsrcnname;//接收人系统名、中文名
lv_jsrsysname = this.f_ReceivesysNameList.Value.ToString().Split('+');
lv_jsrcnname = this.f_ReceiveChNameList.Value.ToString().Split('+');
HyoaClass.Hyoa_sms Hyoa_sms = new HyoaClass.Hyoa_sms();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_user Hyoa_user = new HyoaClass.Hyoa_user();
DataTable dt;
for (int i = 0; i < lv_jsrsysname.Length; i++)
{
Hyoa_sms.ID = Hyoa_global.GetRandom();
Hyoa_sms.DOCID = Hyoa_global.GetRandom();
Hyoa_sms.hy_fsrid = this.txtdjrid.Value;
Hyoa_sms.hy_fsrname = this.f_SendChName.Text;
Hyoa_sms.hy_fsrsjh = this.f_SendMobileNo.Text;
Hyoa_sms.hy_jsrid = lv_jsrsysname[i];
Hyoa_sms.hy_jsrname = lv_jsrcnname[i];
dt = Hyoa_user.Getuserallinfobyloginid(lv_jsrsysname[i]);
if (dt.Rows.Count > 0)
{
Hyoa_sms.hy_jsrsjh = dt.Rows[0]["hy_mobile"].ToString();
}
else
{
Hyoa_sms.hy_jsrsjh = lv_jsrsysname[i];
}
Hyoa_sms.hy_createtime = System.DateTime.Now.ToString();
Hyoa_sms.hy_from = "";
Hyoa_sms.hy_content = this.f_smsContents.Text;
Hyoa_sms.hy_isnowsend = 1;
Hyoa_sms.hy_takedate = "";
Hyoa_sms.hy_taketime = "";
Hyoa_sms.hy_state = 0;
Hyoa_sms.hy_tableid = "Mudelsms";
Hyoa_sms.Insert();
}
}
catch
{
}
finally
{
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}
}
示例2: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_roleuser Hyoa_roleuser = new HyoaClass.Hyoa_roleuser();
////---增加模块权限-------
if (this.fdAddRoleid.Value != "")
{
string[] v_AddRoleid = this.fdAddRoleid.Value.Split(',');
for (var i = 0; i < v_AddRoleid.Length; i++)
{
Hyoa_roleuser.ID = Hyoa_global.GetRandom();
Hyoa_roleuser.hy_roleid = v_AddRoleid[i].ToString();
Hyoa_roleuser.hy_userid = this.txtuserid.Value;
Hyoa_roleuser.Insert();
}
}
////---删除模块权限-------
if (this.fdDelRoleid.Value != "")
{
string[] v_DelRoleid = this.fdDelRoleid.Value.Split(',');
for (var i = 0; i < v_DelRoleid.Length; i++)
{
Hyoa_roleuser.Deletebyroleidanduserid(v_DelRoleid[i].ToString(), this.txtuserid.Value);
}
}
HyoaClass.Hyoa_flowtacheuser Hyoa_flowtacheuser = new HyoaClass.Hyoa_flowtacheuser();
////---增加流程权限-------
if (this.fdAddFlowTacheid.Value != "")
{
string[] v_AddFlowTacheid = this.fdAddFlowTacheid.Value.Split(',');
for (var i = 0; i < v_AddFlowTacheid.Length; i++)
{
Hyoa_flowtacheuser.ID = Hyoa_global.GetRandom();
Hyoa_flowtacheuser.hy_flowid = v_AddFlowTacheid[i].ToString().Substring(0,v_AddFlowTacheid[i].ToString().IndexOf('^'));
Hyoa_flowtacheuser.hy_tacheid = v_AddFlowTacheid[i].ToString().Substring(v_AddFlowTacheid[i].ToString().IndexOf('^')+1, (v_AddFlowTacheid[i].ToString().Length - v_AddFlowTacheid[i].ToString().IndexOf('^')-1));
Hyoa_flowtacheuser.hy_userid = this.txtuserid.Value;
Hyoa_flowtacheuser.Insert();
}
}
//---删除流程权限-------
if (this.fdDelFlowTacheid.Value != "")
{
string[] v_DelFlowTacheid = this.fdDelFlowTacheid.Value.Split(',');
string ls_flowid;
string ls_tacheid;
for (var i = 0; i < v_DelFlowTacheid.Length; i++)
{
ls_flowid = v_DelFlowTacheid[i].ToString().Substring(0, v_DelFlowTacheid[i].ToString().IndexOf('^'));
ls_tacheid = v_DelFlowTacheid[i].ToString().Substring(v_DelFlowTacheid[i].ToString().IndexOf('^') + 1, (v_DelFlowTacheid[i].ToString().Length - v_DelFlowTacheid[i].ToString().IndexOf('^') - 1));
Hyoa_flowtacheuser.Deletebyroleidtacheiduserid(ls_flowid, ls_tacheid, this.txtuserid.Value);
}
}
Response.Write("<script>alert('保存成功!');self.close();</script>");
}
示例3: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "保存成功!";
string ls_attsize = "";
string str_path = "";
string lspath = "";
string lsguid = "";
string lsurl = "";
string lsfilename = "";
string lshy_fatherfield = "";
lsfilename = FileUpload1.FileName;
HyoaClass.Hyoa_fileatt Hyoa_fileatt = new HyoaClass.Hyoa_fileatt();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (lsfilename != "") //attsize
{
lshy_fatherfield = "";
ls_attsize = System.Convert.ToString(System.Convert.ToDouble(System.Convert.ToInt32(System.Convert.ToDouble(FileUpload1.PostedFile.ContentLength.ToString()) / 1024 / 1024 * 1000)) / 1000);//附件的大小
lsguid = Hyoa_global.GetRandom();
System.Console.WriteLine(lsguid);
//SaveCommon(ls_path, ls_attsize, lsguid);
//将附件上传到服务器目录下
lspath = Server.MapPath("~/");//虚拟目录的位置
lsurl = "fileatt\\" + lsguid; //存放的文件夹
Directory.CreateDirectory(lspath + "\\" + lsurl);
str_path = lspath + "\\" + lsurl + "\\" + lsfilename;
FileUpload1.SaveAs(str_path);
Hyoa_fileatt.ID = lsguid;
Hyoa_fileatt.hy_fatherid = this.txtfatherid.Value;
if (this.txtfilename.Text == "")
{
Hyoa_fileatt.hy_filename = lsfilename;
}
else
{
Hyoa_fileatt.hy_filename = this.txtfilename.Text;
}
Hyoa_fileatt.hy_filepath = lsurl + "\\" + lsfilename;
Hyoa_fileatt.hy_filesize = ls_attsize;
Hyoa_fileatt.hy_userid = this.Session["hyuid"].ToString();
Hyoa_fileatt.hy_djsj = System.DateTime.Now.ToString();
if (this.Request.QueryString["fatherfield"] != null)
{
lshy_fatherfield = this.Request.QueryString["fatherfield"].ToString(); ////父文档配置的域名
}
Hyoa_fileatt.hy_fatherfield = lshy_fatherfield;
Hyoa_fileatt.Insert();
}
else
{
this.Response.Write("<script>alert('请选择要上传的文件!');</script>");
}
Response.Write("<script>alert('" + ls_tip + "');var lsurl = window.location.href;window.location = lsurl;window.opener.document.getElementById('btn_sxfj').onclick(); </script>");
}
示例4: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "保存成功!";
//新文档时
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_publicidea Hyoa_publicidea = new HyoaClass.Hyoa_publicidea();
if (this.txtop.Value == "add")
{
Hyoa_publicidea.ID = Hyoa_global.GetRandom();
Hyoa_publicidea.hy_idea = this.txtname.Value;
Hyoa_publicidea.hy_sort = System.Int32.Parse(this.txtsort.Value);
Hyoa_publicidea.Insert();
}
else
{
Hyoa_publicidea.ID = this.txtdocid.Value;
Hyoa_publicidea.hy_idea = this.txtname.Value;
Hyoa_publicidea.hy_sort = System.Int32.Parse(this.txtsort.Value);
Hyoa_publicidea.Update();
}
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}
示例5: Button_Save_Click
////保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "发表文章成功!";
HyoaClass.Hyoa_boke_main Hyoa_boke_main = new HyoaClass.Hyoa_boke_main();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
Hyoa_boke_main.DOCID = Hyoa_global.GetRandom();
Hyoa_boke_main.hy_djrid = this.Session["hyuid"].ToString();
Hyoa_boke_main.hy_djrname = this.Session["hyuname"].ToString();
Hyoa_boke_main.hy_djsj = System.DateTime.Now.ToString();
Hyoa_boke_main.hy_bt = this.txtbt.Text;
Hyoa_boke_main.hy_content = this.Content.Value;
Hyoa_boke_main.hy_visits = 0;
if (Hyoa_boke_main.Insert() == true)
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
this.Response.Write("<script>alert('发表文章失败,请联系管理员!')</script>");
}
}
示例6: Button_Save_Click
////保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "评论成功!";
HyoaClass.Hyoa_boke_reback Hyoa_boke_reback = new HyoaClass.Hyoa_boke_reback();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
Hyoa_boke_reback.DOCID = Hyoa_global.GetRandom();
Hyoa_boke_reback.hy_fatherid = this.txtfatherid.Value;
Hyoa_boke_reback.hy_content = this.Content.Value;
Hyoa_boke_reback.hy_djsj = System.DateTime.Now.ToString();
Hyoa_boke_reback.hy_djrid = this.Session["hyuid"].ToString();
Hyoa_boke_reback.hy_djrname = this.Session["hyuname"].ToString();
string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (userip == null || userip == "")
{
userip = Request.ServerVariables["REMOTE_ADDR"]; //得到客户端IP
}
Hyoa_boke_reback.hy_ip = userip;
if (Hyoa_boke_reback.Insert() == true)
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
this.Response.Write("<script>alert('发表评论失败,请联系管理员!')</script>");
}
}
示例7: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "设置成功,系统将自动转至首页!";
//新文档时
HyoaClass.Hyoa_mystyle Hyoa_mystyle = new HyoaClass.Hyoa_mystyle();
if (this.txtdocid.Value == "")
{
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
Hyoa_mystyle.ID = Hyoa_global.GetRandom();
Hyoa_mystyle.hy_userid = this.txtuserid.Text;
Hyoa_mystyle.hy_style = this.ddlhy_style.SelectedValue.ToString();
Hyoa_mystyle.Insert();
}
else
{
Hyoa_mystyle.ID = this.txtdocid.Value;
Hyoa_mystyle.hy_userid = this.txtuserid.Text;
Hyoa_mystyle.hy_style = this.ddlhy_style.SelectedValue.ToString();
Hyoa_mystyle.Update();
}
Session["mystyle"] = ddlhy_style.SelectedValue.ToString();
Response.Write("<script>alert('" + ls_tip + "');window.top.location='/'</script>");
}
示例8: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "提交成功!";
string ls_insert = "";
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
ls_insert = "insert into hyp_gzlxdhf (id,hy_jsrdocid,hy_fsrdocid,hy_userid,hy_username,hy_deptid,hy_deptname,hy_time,hy_body,hy_ip,hy_ifshow)";
ls_insert += " values ('" + Hyoa_global.GetRandom() + "','" + this.txtid.Value + "','" + this.txtdocid.Value + "','" + this.Session["hyuid"].ToString() + "'";
ls_insert += ",'" + this.Session["hyuname"].ToString() + "','" + this.Session["hydeptid"].ToString() + "','" + this.Session["hydeptname"].ToString() + "'";
ls_insert += ",'" + System.DateTime.Now.ToString() + "','" + this.txthfnr.Text + "','" + HttpContext.Current.Request.UserHostAddress + "','')";
Hyoa_global.ExcuteSQL(ls_insert);
//收件中置为已回复
string ls_update;
ls_update = "update hyp_wjcd set hy_ifyhf='1' where ID='" + this.txtid.Value + "' ";
Hyoa_global.ExcuteSQL(ls_update);
//处理完成后的提示及跳转
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
示例9: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("/login.aspx");
string ls_tip = "保存成功!";
//新文档时
string lscolunid = "", sql = "";
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.DAO db = new HyoaClass.DAO();
if (this.txtselcolid.Value =="")
{
Response.Write("<script>alert('请选择查询的字段!');window.location.href = window.location.href;</script>");
return;
}
if (this.txtop.Value == "add")
{
//判断是否重复
string sql1 = "select * from hyt_searchconfig where hy_mudelid='" + this.ddlmudelid.SelectedValue + "' and hy_tableid='" + this.ddltableid.SelectedValue + "'";
DataTable dt = db.GetDataTable(sql1);
if (dt.Rows.Count > 0)
{
Response.Write("<script>alert('该模块已添加,请修改!');window.location.href = window.location.href;</script>");
return;
}
lscolunid = Hyoa_global.GetRandom();
sql = "insert into hyt_searchconfig (ID,hy_mudelid,hy_tableid,hy_sort,hy_columnshowid,hy_columnshow,hy_ifsearch,hy_xszdid,hy_xszd,hy_kckry,hy_kckryid) values (";
sql += "'" + lscolunid + "','" + this.ddlmudelid.SelectedValue + "','" + this.ddltableid.SelectedValue + "'," + float.Parse(this.txtsort.Text) + "";
sql += ",'" + this.txtselcolid.Value + "','" + this.txtselcol.Value + "','" + this.ddlifsearch.SelectedValue + "'";
sql += ",'" + this.txtselsearchid.Value + "','" + this.txtselsearch.Value + "','" + this.hy_field41_1.Value + "','" + this.hy_field43_1.Value + "')";
db.Execute(sql);
}
else
{
sql = "update hyt_searchconfig set hy_mudelid='" + this.ddlmudelid.SelectedValue + "', hy_tableid='" + this.ddltableid.SelectedValue + "',";
sql += "hy_sort=" + float.Parse(this.txtsort.Text) + ",hy_columnshowid='" + this.txtselcolid.Value + "',hy_columnshow='" + this.txtselcol.Value + "',";
sql += " hy_ifsearch='" + this.ddlifsearch.SelectedValue + "',hy_xszdid='" + this.txtselsearchid.Value + "',hy_xszd='" + this.txtselsearch.Value + "', ";
sql += " hy_kckry='" + this.hy_field41_1.Value + "',hy_kckryid='" + this.hy_field43_1.Value + "' where ID='" + this.txtdocid.Value + "'";
db.Execute(sql);
}
db.Close();
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
if (this.Request.QueryString["pop"] != null)
{
this.txtifpop.Value = this.Request.QueryString["pop"].ToString(); //是否弹出窗口
}
//esppath = Server.MapPath("esp");
//if (this.Session["hyuid"].ToString() == "")
// this.Response.Redirect("../login.aspx");
if (Request.QueryString["url"] != null)
{
this.url.Value = Request.QueryString["url"].ToString();
}
if (Request.QueryString["espid"] != null)
{
this.txtdocid.Value = Request.QueryString["espid"].ToString();
}
//按钮控制
this.tdCreateNew.Visible = false;
this.tdSave.Visible = false;
//判断当前用户是否有新建删除权限
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
string ls_mudelid = "Mudelfwgl";
string ls_role = "";
HyoaClass.Hyoa_mudel Hyoa_mudel = new HyoaClass.Hyoa_mudel();
DataTable dt_mudel = Hyoa_mudel.Getmudel(ls_mudelid);
if (dt_mudel.Rows.Count > 0)
{
ls_role = dt_mudel.Rows[0]["hy_roleid"].ToString();
}
if (Hyoa_global.isHaveRole(ls_role, this.Session["hyuid"].ToString()))
{
if (Request.QueryString["op"] != null)
{
string ls_op = Request.QueryString["op"].ToString();
txtop.Value = ls_op;
if (ls_op == "add")
{
this.tdCreateNew.Visible = true;
this.tdSave.Visible = true;
this.txtdocid.Value = Hyoa_global.GetRandom();
}
}
}
}
}
示例11: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("/login.aspx");
string ls_tip = "保存成功!";
//新文档时
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_iplimit Hyoa_iplimit = new HyoaClass.Hyoa_iplimit();
if (this.txtop.Value == "add")
{
//先判断这个模块编号是否已经存在
DataTable dt = Hyoa_iplimit.Getiplimitsbymudelid(this.ddlmudelid.SelectedValue);
if (dt.Rows.Count > 0)
{
Response.Write("<script>alert('该模块的IP限制已存在,请重新填写!');history.back();</script>");
return;
}
else
{
Hyoa_iplimit.ID = Hyoa_global.GetRandom();
Hyoa_iplimit.hy_mudelid = this.ddlmudelid.SelectedValue;
Hyoa_iplimit.hy_iplists = this.txtiplists.Value;
Hyoa_iplimit.hy_createtime = System.DateTime.Now.ToString();
Hyoa_iplimit.hy_isenabled = this.ddlisenabled.SelectedValue;
Hyoa_iplimit.Insert();
}
}
else
{
Hyoa_iplimit.ID = this.txtdocid.Value;
Hyoa_iplimit.hy_mudelid = this.ddlmudelid.SelectedValue;
Hyoa_iplimit.hy_iplists = this.txtiplists.Value;
Hyoa_iplimit.hy_createtime = System.DateTime.Now.ToString();
Hyoa_iplimit.hy_isenabled = this.ddlisenabled.SelectedValue;
Hyoa_iplimit.Update();
}
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}
示例12: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "上传成功!";
string ls_attsize = "";
string str_path = "";
string lspath = "";
string lsguid = "";
string lsurl = "";
string lsfilename = "";
string lshy_fatherfield = "";
lsfilename = FileUpload1.FileName;
HyoaClass.Hyoa_boke_headpic Hyoa_boke_headpic = new HyoaClass.Hyoa_boke_headpic();
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
if (lsfilename != "") //attsize
{
//先删除再插入
Hyoa_boke_headpic.Delete(this.Session["hyuid"].ToString()); //删除
//插入
lshy_fatherfield = "";
ls_attsize = System.Convert.ToString(System.Convert.ToDouble(System.Convert.ToInt32(System.Convert.ToDouble(FileUpload1.PostedFile.ContentLength.ToString()) / 1024 / 1024 * 1000)) / 1000);//附件的大小
lsguid = Hyoa_global.GetRandom();
System.Console.WriteLine(lsguid);
//SaveCommon(ls_path, ls_attsize, lsguid);
//将附件上传到服务器目录下
lspath = Server.MapPath("~/");//虚拟目录的位置
lsurl = "fileatt\\" + lsguid; //存放的文件夹
Directory.CreateDirectory(lspath + "\\" + lsurl);
str_path = lspath + "\\" + lsurl + "\\" + lsfilename;
FileUpload1.SaveAs(str_path);
Hyoa_boke_headpic.DOCID = lsguid;
Hyoa_boke_headpic.hy_picpath = lsurl + "\\" + lsfilename;
Hyoa_boke_headpic.hy_userid = this.Session["hyuid"].ToString();
Hyoa_boke_headpic.Insert();
}
else
{
this.Response.Write("<script>alert('请选择要上传的头像!');</script>");
}
Response.Write("<script>alert('" + ls_tip + "');window.close(); </script>");
}
示例13: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("/login.aspx");
string ls_tip = "保存成功!";
//新文档时
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_license Hyoa_license = new HyoaClass.Hyoa_license();
if (this.txtop.Value == "add")
{
Hyoa_license.ID = Hyoa_global.GetRandom();
Hyoa_license.hy_sqrid = this.txthy_sqrid.Value;
Hyoa_license.hy_sqrname = this.txthy_sqrname.Text;
Hyoa_license.hy_starttime = this.txthy_starttime.Value;
Hyoa_license.hy_endtime = this.txthy_endtime.Value;
Hyoa_license.hy_bsqrid = this.txthy_bsqrid.Value;
Hyoa_license.hy_bsqrname = this.txthy_bsqrname.Value;
Hyoa_license.hy_isenabled = this.ddlisenabled.SelectedValue;
Hyoa_license.hy_createtime = System.DateTime.Now.ToString();
Hyoa_license.Insert();
}
else
{
Hyoa_license.ID = this.txtdocid.Value;
Hyoa_license.hy_isenabled = this.ddlisenabled.SelectedValue;
Hyoa_license.Update();
}
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}
示例14: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("/login.aspx");
string ls_tip = "保存成功!";
//新文档时
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_post Hyoa_post = new HyoaClass.Hyoa_post();
if (this.txtop.Value == "add")
{
Hyoa_post.ID = Hyoa_global.GetRandom();
Hyoa_post.hy_userid = this.Session["hyuid"].ToString();
Hyoa_post.userid = this.txtuserid.Value;
Hyoa_post.pwd = Hyoa_post.Encrypt(this.txtpwd.Value);
Hyoa_post.hy_type = this.ddltypename.SelectedValue;
Hyoa_post.Insert();
}
else
{
Hyoa_post.ID = this.txtdocid.Value;
Hyoa_post.hy_userid = this.Session["hyuid"].ToString();
Hyoa_post.userid = this.txtuserid.Value;
Hyoa_post.pwd = Hyoa_post.Encrypt(this.txtpwd.Value);
Hyoa_post.hy_type = this.ddltypename.SelectedValue;
Hyoa_post.Update();
}
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}
示例15: Button_Save_Click
//保存
protected void Button_Save_Click(object sender, EventArgs e)
{
if (this.Session["hyuid"].ToString() == "")
this.Response.Redirect("../login.aspx");
string ls_tip = "保存成功!";
//新文档时
HyoaClass.Hyoa_global Hyoa_global = new HyoaClass.Hyoa_global();
HyoaClass.Hyoa_site Hyoa_site = new HyoaClass.Hyoa_site();
if (this.txtop.Value == "add")
{
Hyoa_site.id = Hyoa_global.GetRandom();
Hyoa_site.hy_version = this.txtversion.Value;
Hyoa_site.hy_copyright = this.txtcopyright.Value;
Hyoa_site.hy_copyrightinfo = this.Content.Value;
Hyoa_site.hy_indexpath = this.ddlhy_indexpath.SelectedValue;
Hyoa_site.hy_imagepath = "";
Hyoa_site.Insert();
}
else
{
Hyoa_site.id = this.txtdocid.Value;
Hyoa_site.hy_version = this.txtversion.Value;
Hyoa_site.hy_copyright = this.txtcopyright.Value;
Hyoa_site.hy_copyrightinfo = this.Content.Value;
Hyoa_site.hy_indexpath = this.ddlhy_indexpath.SelectedValue;
Hyoa_site.hy_imagepath = "";
Hyoa_site.Update();
}
//处理完成后的提示及跳转
if (this.txtifpop.Value == "")
{
Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
}
else
{
Response.Write("<script>alert('" + ls_tip + "');self.close();</script>");
}
}