protected void btnAdd_Click(object sender, EventArgs e)
        {
            string UserID = this.hidUserID.Value;
            string UserName =this.hidUserName.Value;

            if (UserID.Trim().Replace(";", "").Length < 1)
            {
                this.ShowJsMessage("请选择人员");
                return;
            }
            int Flag = new DailyDecDB().SetRange(Request.QueryString["type"], UserID, UserName);
            if (Flag > 0)
            {
                this.CallJsFun("alert('成功保存');window.close();");
            }
            else
            {
                this.ShowJsMessage("保存失败,请重试");
            }
        }
示例#2
0
        public int InsertHead(string UP_DAY)
        {
            string Range_List = new DailyDecDB().GetRangeList("HLDT");
            string Sql = " INSERT INTO DAILY_SHIP_HEAD(GUID,UP_DAY,STATUS,Q_RANGE) VALUES(:GUID,:UP_DAY,:STATUS,:Q_RANGE)";
            Database db = DatabaseFactory.CreateDatabase(DailyConstr);
            DbCommand cmd2 = db.GetSqlStringCommand(Sql);
            db.AddInParameter(cmd2, "GUID", DbType.String, Guid.NewGuid().ToString());
            db.AddInParameter(cmd2, "UP_DAY", DbType.String, UP_DAY);
            db.AddInParameter(cmd2, "STATUS", DbType.String, "0");
            db.AddInParameter(cmd2, "Q_RANGE", DbType.String, Range_List);

            return db.ExecuteNonQuery(cmd2);
        }