コード例 #1
0
        protected void btnSaveChild_Click(object sender, EventArgs e)
        {
            string strID   = editchildID.Text.ToString().Trim();
            string strhdid = editID.Text.ToString().Trim();
            Dictionary <string, string> dic = initchildDatadic(strhdid);

            bi_heatdevice_repair bhdr = new bi_heatdevice_repair();
            int intresult             = 0;

            if (strID == "")
            {
                dic.Add("ID", Guid.NewGuid().ToString());

                intresult = bhdr.add(dic, "bi_heatdevice_repair");
            }
            else
            {
                intresult = bhdr.update(dic, "bi_heatdevice_repair", "ID", strID);
            }

            BindchildGrid(strhdid);

            Alert alert = new Alert();

            if (intresult == 1)
            {
                alert.Icon    = Icon.Information;
                alert.Message = "数据保存成功";
            }
            else
            {
                alert.MessageBoxIcon = MessageBoxIcon.Error;
                alert.Message        = "数据保存失败";
            }

            alert.Show();
        }