private void CreateNewData()
        {
            JObject defaultObj = new JObject();

            defaultObj.Add("Name", "费率小计");
            defaultObj.Add("Amount", 1200);
            defaultObj.Add("Size", 0);

            Grid1.AddNewRecord(defaultObj, AppendToEnd);
        }
Пример #2
0
        protected void btnNew_Click(object sender, EventArgs e)
        {
            //if (GetRequestEventArgument() == "Cancel")
            //{
            //    Alert.Show("取消执行操作三!");
            //}
            //else
            //{
            //    Alert.Show("执行了操作三!");
            //}
            //判断

            if (ddlShop.SelectedValue == "0")
            {
                Alert.Show("门店名称不能为空!");
                return;
            }

            if (ddlOUT_SHOP.SelectedValue == "0")
            {
                Alert.Show("供货分店不能为空!");
                return;
            }

            if (ddlORDER_DEP.SelectedValue == "0")
            {
                Alert.Show("订货部门不能为空!");
                return;
            }

            // 新增数据初始值
            JObject defaultObj = new JObject();

            defaultObj.Add("PROD_ID", "0");
            defaultObj.Add("PROD_NAME1", "0");
            defaultObj.Add("PROD_SPEC", "");
            defaultObj.Add("PROD_UNIT", "");

            defaultObj.Add("ON_QUAN", "");
            defaultObj.Add("STD_PRICE", "0.000000");

            defaultObj.Add("QUAN1", 0);
            defaultObj.Add("Order_QUAN", 1);
            defaultObj.Add("PROD_MEMO", "");

            // defaultObj.Add("Delete", String.Format("<a href=\"javascript:;\" onclick=\"{0}\"><img src=\"{1}\"/></a>", deleteScript, IconHelper.GetResolvedIconUrl(Icon.Delete)));

            // 在第一行新增一条数据
            // btnNew.OnClientClick = Grid1.GetAddNewRecordReference(defaultObj, AppendToEnd);

            Grid1.AddNewRecord(defaultObj, AppendToEnd);
        }
Пример #3
0
        /// <summary>
        /// 订货部门新增一行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonOrderDepNewRow_Clikc(object sender, EventArgs e)
        {
            JObject deObject = new JObject();

            deObject.Add("Id", "0");
            deObject.Add("ORDDEP_ID", "");
            deObject.Add("ORDDEP_NAME", "");
            deObject.Add("ORDER_WEEK", "");
            deObject.Add("USABLE", true);
            var    OlUser = OnlineUsersBll.GetInstence().GetModelForCache(x => x.UserHashKey == Session[OnlineUsersTable.UserHashKey].ToString());
            string lgname = OlUser.Manager_LoginName;

            deObject.Add("CRT_USER_ID", lgname);
            deObject.Add("CRT_DATETIME", DateTime.Now.ToString());
            deObject.Add("MOD_USER_ID", OlUser.Manager_LoginName);
            deObject.Add("MOD_DATETIME", DateTime.Now.ToString());
            Grid1.AddNewRecord(deObject, true);
        }