merge N++ 0.1
This commit is contained in:
@@ -11,9 +11,11 @@ using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using static Model.activity_check;
|
||||
|
||||
public partial class admin_follower_reg : MyWeb.config
|
||||
{
|
||||
@@ -142,7 +144,7 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
country.Value = prod.country.ToString();
|
||||
}
|
||||
if (prod.reg_time.HasValue)
|
||||
{
|
||||
{
|
||||
timePanel1.Visible = true;
|
||||
reg_time.Text= prod.reg_time.Value.ToString("yyyy/MM/dd HH:mm:ss");
|
||||
}
|
||||
@@ -153,7 +155,6 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
modify_time.Text = prod.admin_log;
|
||||
}
|
||||
|
||||
|
||||
edit.Visible = true;
|
||||
goback.Visible = true;
|
||||
add.Visible = false;
|
||||
@@ -178,10 +179,39 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
Response.Redirect("index.aspx?page=" + Convert.ToString(Request["page"]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#region 資料新增
|
||||
protected string createOrderNumber()
|
||||
{
|
||||
Application.Lock();
|
||||
string order_no = "AA" + DateTime.Now.ToString("yyMMdd");
|
||||
|
||||
var qry = _db.companies.AsQueryable();
|
||||
//var prod = qry.Where(q => q.last_order_no.Contains(order_no)).FirstOrDefault();
|
||||
var prod = qry.Where(q => q.num == 1).FirstOrDefault();
|
||||
if (prod != null)
|
||||
{
|
||||
if (!isStrNull(prod.last_order_no) && prod.last_order_no.Contains(order_no))
|
||||
{
|
||||
int tmp = Convert.ToInt32(prod.last_order_no.Replace(order_no, "")) + 1;
|
||||
order_no = order_no + tmp.ToString("0000");
|
||||
}
|
||||
else
|
||||
{
|
||||
order_no = order_no + "0001";
|
||||
}
|
||||
|
||||
prod.last_order_no = order_no;
|
||||
_db.SaveChanges();
|
||||
}
|
||||
else
|
||||
order_no = "";
|
||||
|
||||
Application.UnLock();
|
||||
|
||||
return order_no;
|
||||
}
|
||||
protected void add_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Page.IsValid) {
|
||||
@@ -205,7 +235,7 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
{
|
||||
ObjValue.SetValue(followers, selectDate(textBox));
|
||||
}
|
||||
else if (!isStrNull(((TextBox)obj).Attributes["data-encrypt"])
|
||||
else if (!isStrNull(((TextBox)obj).Attributes["data-encrypt"])
|
||||
&& ValString(textBox.Attributes["data-encrypt"]).Equals("Y"))
|
||||
{
|
||||
ObjValue.SetValue(followers, encrypt.EncryptAutoKey(textBox.Text.Trim()));
|
||||
@@ -270,9 +300,9 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
|
||||
Model.admin_log admin_log = new Model.admin_log();
|
||||
admin_log.writeLog(admin.info.u_id, (int)Model.admin_log.Systems.Follower, (int)Model.admin_log.Status.Insert, f_number.Text + u_name.Text);
|
||||
|
||||
|
||||
Session["LastAddedID"] = followers.f_number;
|
||||
|
||||
|
||||
Response.Redirect("index.aspx");
|
||||
}
|
||||
else
|
||||
@@ -292,8 +322,8 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
L_msg.Type = alert_type.danger;
|
||||
L_msg.Text = "信眾編號重複";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -331,10 +361,7 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
}
|
||||
else
|
||||
ObjValue.SetValue(followers, null);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
followers.identity_type = Val(identity_type.SelectedValue);
|
||||
@@ -410,16 +437,16 @@ public partial class admin_follower_reg : MyWeb.config
|
||||
L_msg.Type = alert_type.danger;
|
||||
L_msg.Text = "查無資料";
|
||||
}
|
||||
/*
|
||||
if (chk_pro_num(f_number.Text, Val(Request["num"])))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
L_msg.Type = alert_type.danger;
|
||||
L_msg.Text = "信眾編號重複";
|
||||
}
|
||||
*/
|
||||
/*
|
||||
if (chk_pro_num(f_number.Text, Val(Request["num"])))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
L_msg.Type = alert_type.danger;
|
||||
L_msg.Text = "信眾編號重複";
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user