Example #1
0
        private void bt_Ter_Save_Click(object sender, EventArgs e)
        {
            if (CheckingTerInfo())
            {
                if (tempTerritorialID == -1) //新增
                {
                    if (SaveTer())           //成功
                    {
                        SetTipsInfo(lb_TerTipsInfo, true, "保存成功!");

                        //Czlt-2011-12-10 跟新时间
                        areaBll.UpdateTime();


                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmAm.Refresh_Ter();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmAm.HostBackRefresh(true);
                        }
                    }
                    else                //失败
                    {
                        SetTipsInfo(lb_TerTipsInfo, false, "保存失败!");
                    }
                }
                else                    //修改
                {
                    if (UpDateTer())    //成功
                    {
                        SetTipsInfo(lb_TerTipsInfo, true, "修改成功!");

                        //Czlt-2011-12-10 跟新时间
                        areaBll.UpdateTime();


                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmAm.Refresh_Ter();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmAm.HostBackRefresh(true);
                        }
                    }
                    else                //失败
                    {
                        SetTipsInfo(lb_TerTipsInfo, false, "修改失败!");
                    }
                }
            }
        }
Example #2
0
        private void bt_TerSet_Save_Click(object sender, EventArgs e)
        {
            strTerSet = "";
            int intImpactCounts = 0;

            foreach (TreeNode tr in tvc_StationHead_Ter.Nodes)
            {
                if (tr.Nodes.Count > 0)
                {
                    SaveTerSet(tr);
                }
            }
            intImpactCounts = areaBll.UpDateTerSet(tempTerritorialID_TerSet, strTerSet);


            SetTipsInfo(lb_TerSetTipsInfo, true, "保存成功!");

            //Czlt-2011-12-10 跟新时间
            areaBll.UpdateTime();


            if (!New_DBAcess.IsDouble)          //单机版,直接刷新
            {
                frmAm.Refresh_TerSet();
            }
            else                                //热备版,启用定时器
            {
                frmAm.HostBackRefresh(true);
            }
        }