示例#1
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final(element, _parent, args);

        if (element != null) {
            style = element.GetAttribute ("style");

            string s = element.GetAttribute ("value");
            if (s != null) {
                value = PlanetUnityStyle.ReplaceStyleTags(PlanetUnityOverride.processString(this, s));
            }

            s = element.GetAttribute ("autoreload");
            if (s != null) {
                autoreload = bool.Parse(s);
            }
        }

        if (style != null) {
            string classString = "MarkdownStyle" + style;

            Type entityClass = Type.GetType (classString, true);
            mdStyle = (Activator.CreateInstance (entityClass)) as MarkdownStyle;
        } else {
            mdStyle = new MarkdownStyleGeneric();
        }

        mdStyle.markdownEntity = this;
    }
示例#2
0
        private void button3_Click(object sender, EventArgs e)
        {
            var a1 = new { tyn = (UInt16)12, jj = "test111" };
            var a2 = new { rnh = (UInt16)12, rttr = button1 };

            TT t = new TT();
            t.St = new List<string>() { "iii", "hyiy" };
            t.Anon1 = new List<object>() { a1, a2 };
            t.Anon2 = new List<object>() { a2, a1 };
            t.TA = new DataTable("patients_tName", "tabNsp");
            t.TA.Columns.Add("name");
            t.TA.Columns.Add("id", typeof(Button));
            t.TA.Rows.Add("sam", button1);
            t.TA.Rows.Add("mark", button2);
            t.TA.Rows.Add("mareek", button2);
            t.DS = new DataSet("uuu");
            t.DS.Tables.Add(t.TA);
            //   var wtw = (Button)t.TA.Rows[1][1];
            TB b = new TB();
            b.ttest = "1";
            TB B = new TB();
            B.ttest = "2";
            t.TB1 = b;
            t.TB2 = Tuple.Create(11, b);
            t.TB3 = new List<Tuple<int, TB>>() { t.TB2 };
            //   t.Save();
            t.D_str_TB = new SortedList<string, TB>();
            t.DDS = new List<DataSet>() { t.DS };
            string tt = t.D_str_TB.GetType().FullName;
            t.D_str_TB.Add("ku", b);
            Dictionary<string, TB> D_s_TB = new Dictionary<string, TB>();
            D_s_TB.Add("oo", B);
            t.AR = new Dictionary<string, TB>[2] { D_s_TB, D_s_TB };
            t.AAR = new List<Dictionary<string, TB>[]> { t.AR };
            t.DD = new Dictionary<SortedList<string, TB>, TB>();
            t.DD.Add(t.D_str_TB, b);
            t.L = new List<Dictionary<string, TB>>();
            // t.L.Add(t.D_str_TB);
            t.L.Add(D_s_TB);
            t.l1 = t.L;
            t.l2 = t.L;
            t.ll = new List<List<Dictionary<string, TB>>>();
            t.ll.Add(t.L);
            t.GetCache().Init();//Save();
            var ww = t.GetCache();
            string ert = t.GetCache().ToSerializableString();
            t.Save();
            t.LoadData();
            TT t2 = new TT();
            // t2.GetCache().FromSerializableString(ert);
            t2.LoadData();
            Debug_.Debug.InitF(2, 1);
            Debug_.Debug.Print(t2.GetCache().ToString(), 1);
            Debug_.Debug.Print(t.GetCache().ToString(), 0);
        }
示例#3
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final (element, _parent, args);

        string attrib;

        if (element != null) {
            attrib = element.GetAttribute ("angle");
            if (attrib != null) {
                angle = float.Parse (attrib);
            }
        }
    }
示例#4
0
文件: Form1.cs 项目: tsv129/SAPKIS1
 private void btn_proc_Click(object sender, EventArgs e)
 {
     if (func == 0)
     {
         func        = 5;
         first       = Double.Parse(TB.Text);
         label1.Text = TB.Text + " %";
         TB.Clear();
     }
     else
     {
         Func();
         func = 0;
     }
 }
示例#5
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="splitPage">分页参数</param>
        /// <returns></returns>
        public ActionResult GetDataGridJson(SplitPage splitPage)
        {
            string sqlw  = SxSqlHelperBLL.getSqlw(splitPage);
            int    total = 0;

            System.Data.DataTable dt = new System.Data.DataTable();
            SxSqlHelperBLL.getPageDataEasyUi(sqlw, "Base_Person", splitPage, ref total, ref dt);
            if (!TB.CheckTB(dt))
            {
                dt = new System.Data.DataTable();
            }
            var jsonData = new { rows = dt, total = total };

            return(ToJsonResult(jsonData));
        }
示例#6
0
        public override void OnLayout(IGUIContext ctx, RectangleF bounds)
        {
            if (IsLayoutSuspended)
            {
                return;
            }
            SetBounds(bounds);

            if (TB.Font != null)
            {
                float height = TB.Font.TextBoxHeight;
                Button.SetBounds(new RectangleF(bounds.Right - height - 1, bounds.Top.Ceil(), height + 1, (int)height));
                TB.OnLayout(ctx, new RectangleF(bounds.Left, bounds.Top, bounds.Width - height, height));
            }
        }
示例#7
0
 public void OnLoad()
 {
     Loading           = true;
     LoadIndex         = -1;
     FinalText         = "";
     FinalChoices      = new List <Choice>();
     FinalEventChoices = new List <EventChoice>();
     foreach (TextBlock TB in Blocks)
     {
         if (TB.Active())
         {
             FinalText += TB.Content;
         }
     }
     foreach (Choice C in Choices)
     {
         if (C.Active())
         {
             FinalChoices.Add(C);
         }
     }
     foreach (EventChoice EC in EventChoices)
     {
         if (EC.Active())
         {
             FinalEventChoices.Add(EC);
         }
     }
     foreach (VariableChange VC in Changes)
     {
         VC.Process();
     }
     CurrentDelay = GetDelay() * 0.25f;
     CommandCheck();
     IndexCheck();
     foreach (UnitEffect UE in Effects)
     {
         UE.Effect();
     }
     foreach (NextUnitOverride NUO in Overrides)
     {
         if (NUO.Active())
         {
             NextUnit = NUO.GetUnit();
             break;
         }
     }
 }
示例#8
0
        // IME変換中の判定は、こちらのblogを参考にさせて頂きました。
        // https://yone64.wordpress.com/2010/10/25/ime%E3%81%A7%E5%A4%89%E6%8F%9B%E7%8A%B6%E6%85%8B%E4%B8%AD%E3%81%A7%E3%82%82textbox-textchanged%E3%81%8C%E7%99%BA%E7%94%9F%E3%81%99%E3%82%8B/
        private async void TB_TextChanged(object sender, TextChangedEventArgs e)
        {
            if (_imeFlag)
            {
                return;
            }
            //IMEで確定した場合のみ、ここに入る
            string kanji = string.Copy(TB.Text); // TBをクリアするので、コピーしておく。

            if (kanji != "")
            {
                // 文字が入力されていたら、送信する
                await SendKanjiAsync(kanji);
            }
            TB.Clear();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            BP.WF.Port.WFEmp emp   = new BP.WF.Port.WFEmp(BP.Web.WebUser.No);
            BP.WF.Port.WFEmp empAu = new BP.WF.Port.WFEmp(Request["FK_Emp"]);
            this.sqg.Text = empAu.No + "    " + empAu.Name;


            TB tb = new TB();

            tb.ID = "sqrq";
            System.DateTime dtNow = System.DateTime.Now;
            dtNow                    = dtNow.AddDays(14);
            this.sqrq.Text           = dtNow.ToString(DataType.SysDataTimeFormat);
            tb.ShowType              = TBType.DateTime;
            tb.Attributes["onfocus"] = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'});";
        }
示例#10
0
        void load_grid()
        {
            var db         = kn.connosql;
            var collection = db.GetCollection <TB>("THIETBI");
            var query      = collection.AsQueryable <TB>().ToList();

            dtgv_thietbi.Rows.Clear();
            foreach (var query1 in query)
            {
                TB tb = new TB();
                tb.id    = query1.id;
                tb.MaTB  = query1.MaTB;
                tb.TenTB = query1.TenTB;
                dtgv_thietbi.Rows.Add(query1.id, query1.MaTB, query1.TenTB);
            }
        }
示例#11
0
        static void Main(string[] args)
        {
            List <ToyBox> toyboxes = new List <ToyBox>();
            string        UserAnswer;

            Console.WriteLine("Please add a toybox.");
            do
            {
                ToyBox newToyBox = GetNewToyBoxFromUser();
                toyboxes.Add(newToyBox);
                Console.WriteLine("Do you want to add another toybox? yes or no>>");
                UserAnswer = Console.ReadLine();
            } while (UserAnswer.ToLower() == "yes");


            string answer;

            foreach (ToyBox toyBox in toyboxes)
            {
                Console.WriteLine($"Time to fill {toyBox.Owner}'s Toy Box!");
                do
                {
                    Toy newToy = GetNewToyFromUser();
                    toyBox.Toys.Add(newToy);

                    Console.WriteLine("do you want to enter another toy? yes or no?>>");
                    answer = Console.ReadLine();
                } while (answer.ToLower() == "yes");
            }

            Console.WriteLine("Time to take a look at all your toys!");
            Console.WriteLine();
            foreach (ToyBox toyBox in toyboxes)
            {
                Console.WriteLine($"Content of {toyBox.Owner}'s ToyBox!");
                foreach (Toy toy in toyBox.Toys)
                {
                    Console.WriteLine(toy);
                }
            }

            foreach (ToyBox TB in toyboxes)
            {
                Console.WriteLine($"{TB.GetRandomToy().Name}");
            }
        }
 // Constructor
 public MainPage()
 {
     InitializeComponent();
     // here, for illustration purposes,  I have declared and instantiated a listbox in the code-behind,
     // normally the declaration and initialization is done by auto-generated code,
     // when you have dropped the list into your GUI via the designer...
     // although the actual adding of items is either populated in code-behind
     // or is accomplished by binding to a source in the designer.
     this.mylistbox   = new ListBox();
     this.currentItem = null;
     // add some items...
     TB[] tbs = new TB[] { new TB(), new TB(), new TB() };
     this.mylistbox.ItemsSource = tbs;
     // subscribe to the SelectionChanged event...
     this.mylistbox.SelectionChanged += new SelectionChangedEventHandler(mylistbox_SelectionChanged);
     this.mylistbox.Hold             += new EventHandler <GestureEventArgs>(mylistbox_Hold);
 }
示例#13
0
        void btn_Author_Set_Click(object sender, EventArgs e)
        {
            TB  tb_Author     = this.Pub1.GetTBByID("TB_Author_No");
            DDL ddl_AuthorWay = this.Pub1.GetDDLByID("ddl_AuthorWay");
            TB  tb_FlowNos    = this.Pub1.GetTBByID("TB_Author_FlowNos");

            if (tb_Author == null || ddl_AuthorWay == null || tb_FlowNos == null)
            {
                return;
            }
            bool bResult = Dev2Interface.Flow_AuthorSave(tb_Author.Text, int.Parse(ddl_AuthorWay.SelectedItem.Value), tb_FlowNos.Text);

            if (bResult == true)
            {
                this.Alert("设置成功。");
                this.Response.Redirect("AuthorDemo.aspx");
            }
        }
示例#14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BP.WF.Node nd = new BP.WF.Node(this.FK_Node);

            this.Pub1.AddTable();
            this.Pub1.AddCaption("抄送规则");

            this.Pub1.AddTR();
            this.Pub1.AddTD("标题");
            TB tb = new TB();

            tb.Text = ""; // nd.HisCCRole;
            tb.ID   = "TB_Title";
            this.Pub1.AddTD(tb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTableEnd();
        }
示例#15
0
        public void EditInt(MapAttr mapAttr)
        {
            this.EditBeforeAdd(mapAttr);

            TB tb = new TB();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("文本框宽度");
            tb          = new TB();
            tb.ID       = "TB_UIWidth";
            tb.CssClass = "TBNum";
            tb.Text     = mapAttr.UIWidth.ToString();
            this.Pub1.AddTD(tb);
            this.Pub1.AddTDB("对从表有效");
            this.Pub1.AddTREnd();
            this.EditBeforeEnd(mapAttr);
        }
示例#16
0
        public override void OnLayout(IGUIContext ctx, RectangleF bounds)
        {
            if (IsLayoutSuspended)
            {
                return;
            }

            SetBounds(bounds);
            bounds = Bounds;

            float buttonWidth = UpButton.PreferredSize(ctx).Width;
            float halfHeight  = bounds.Height / 2f;
            float buttonLeft  = bounds.Right - buttonWidth;

            UpButton.SetBounds(new RectangleF(buttonLeft, bounds.Top, buttonWidth, halfHeight));
            DownButton.SetBounds(new RectangleF(buttonLeft, bounds.Top + halfHeight - 1, buttonWidth, bounds.Height - halfHeight));

            TB.OnLayout(ctx, new RectangleF(bounds.Left, bounds.Top, bounds.Width - buttonWidth, bounds.Height));
        }
示例#17
0
        public void Start()
        {
            try
            {
                listener = new TcpListener(MyIp, Convert.ToInt32(port));
                listener.Start();

                byte[] data = new byte[1024];
                while (flag)
                {
                    mytcpclient = listener.AcceptTcpClient();
                    stream      = mytcpclient.GetStream();
                    do
                    {
                        CountBytes = stream.Read(data, 0, data.Length);
                        builder2.Append(Encoding.Unicode.GetString(data, 0, CountBytes));
                    }while (stream.DataAvailable);
                    TB.Invoke((MethodInvoker)(delegate() { TB.AppendText(Environment.NewLine + " Подключился " + builder2.ToString()); }));
                    data = null;

                    DateTime DTime = DateTime.Now;

                    data = Encoding.Unicode.GetBytes(DTime.ToString());
                    TB.Invoke((MethodInvoker)(delegate() { TB.AppendText(Environment.NewLine + " Отправляем - " + DTime.ToString()); }));

                    stream.Write(data, 0, data.Length);
                    builder2.Clear();
                }
                stream.Close();
                listener.Stop();
                Thread.ResetAbort();
            }
            catch (Exception ex)
            {
                //TB.AppendText(Environment.NewLine + "Отключаемся");
                if (stream != null)
                {
                    stream.Close();
                }
            }
        }
示例#18
0
        void btn_Loin_Click(object sender, EventArgs e)
        {
            TB user_no = this.Pub1.GetTBByID("TB_WebUser_No");

            if (user_no == null || user_no.Text == "")
            {
                this.Alert("请输入登录账号。");
                return;
            }
            try
            {
                Emp port_emp = new Emp(user_no.Text);
            }
            catch (Exception ex)
            {
                this.Alert(ex.Message);
            }
            // 调用登录接口,写入登录信息。
            BP.WF.Dev2Interface.Port_Login(user_no.Text);
            this.Response.Redirect("AuthorDemo.aspx");
        }
 void Awake()
 {
     rendList      = new Renderer[100];
     PlayerControl = GameObject.Find("Player");
     if (GameObject.Find("BuildMenu") != null)
     {
         BuildMenu = GameObject.Find("BuildMenu");
         TB        = BuildMenu.transform.Find("TownBuildings").gameObject;
         DB        = BuildMenu.transform.Find("DefenceBuildings").gameObject;
         MB        = BuildMenu.transform.Find("MiscBuildings").gameObject;
         Menu      = BuildMenu.transform.Find("MainMenu").gameObject;
     }
     BuildingParent = GameObject.Find("Buildings");
     mainCamera     = GameObject.Find("Main Camera");
     Master         = GameObject.Find("GameMaster");
     Base           = GameObject.Find("BaseBuilding");
     TB.SetActive(false);
     DB.SetActive(false);
     MB.SetActive(false);
     Menu.SetActive(false);
     CloseMenu();
 }
        public void CONNZAP()
        {
            try
            {
                Btn.Invoke((MethodInvoker)(delegate() { Btn.Enabled = false; }));
                client = new TcpClient(address, port); //подключаемся
                stream = client.GetStream();           //открываем поток

                {
                    data = Encoding.Unicode.GetBytes(Environment.UserName); //имя залогиневшего пользователя конвертим в массив байт
                    stream.Write(data, 0, data.Length);                     //отправляем массив байт по сети

                    do
                    {
                        CountBytes = stream.Read(data, 0, data.Length);
                        builder.Append(Encoding.Unicode.GetString(data, 0, CountBytes));
                    }while (stream.DataAvailable);
                    TB.Invoke((MethodInvoker)(delegate() { TB.AppendText(Environment.NewLine + " Получили от сервера - " + builder.ToString()); }));
                    builder.Clear();
                    Btn.Invoke((MethodInvoker)(delegate() { Btn.Enabled = true; }));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Не удалось установить соединение, проверьте параметры подключения и брандмауэр на предмет блокировки порта" + ex, "Ошибка соединения", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (client != null)
                {
                    client.Close();
                }
            }
            finally
            {
                if (client != null)
                {
                    client.Close();
                }
                Btn.Invoke((MethodInvoker)(delegate() { Btn.Enabled = true; }));
            }
        }
示例#21
0
        public void Gain(OleDbConnection connection)
        {
            var reader = ADOSQLHelper.ExecuteReader(connection, string.Format("select XZCDM,XZCMC,TBBH,{0} from {1}", string.Join(",", AreaFields), TableName));

            if (reader != null)
            {
                List = new List <TB>();
                while (reader.Read())
                {
                    var val = new TB
                    {
                        XZCDM = reader[0].ToString(),
                        XZCMC = reader[1].ToString(),
                        TBBH  = reader[2].ToString()
                    };
                    var sum = .0;
                    for (var i = 3; i < AreaFields.Length + 3; i++)
                    {
                        var a = .0;
                        if (double.TryParse(reader[i].ToString(), out a))
                        {
                            sum += a / Denominator;
                        }
                    }
                    val.MJ = sum;
                    List.Add(val);
                }
                if (List.Count == 0)
                {
                    //var info = string.Format("获取表【{0}】中的图斑面积时,图斑面积数据量为空", TableName);
                    //LogManager.Log(info);
                    //QuestionManager.Add(new Question { Code = "3201", Name = "检验图斑面积", TableName = TableName, Description = info });
                }
                else
                {
                    DCDYTBManager.AddTB(List);
                }
            }
        }
示例#22
0
        /*
         * protected override CreateParams CreateParams
         * {
         *      get
         *      {
         *              CreateParams cp = base.CreateParams;
         *              cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED
         *              return cp;
         *      }
         * }
         */
        public void Add(string text)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new Action <string>(Add), text);
            }
            else
            {
                if (!string.IsNullOrEmpty(text))
                {
                    text              = text.Replace('\r', '\n');
                    TB.Text          += text;
                    TB.SelectionStart = TB.Text.Length;
                    TB.ScrollToCaret();

                    if (m_File != null)
                    {
                        m_File.Write(text);
                    }
                }
            }
        }
示例#23
0
            public ItemData(ILuaEnvironment E, string name, Type baseType, Type[] _interfaces)
            {
                this.MethodArgs = new List <ILuaValue>();
                this.Methods    = new List <MethodInfo>();
                this.Constants  = new List <ILuaValue>();
                this.Names      = new HashSet <string>();
                this.Env        = E;
                this.FID        = 0;

                // Create the type builder.
                var ab = AppDomain.CurrentDomain.DefineDynamicAssembly(
                    new AssemblyName("DynamicAssembly2"),
                    AssemblyBuilderAccess.RunAndSave);

                this.AB = ab;
                ModuleBuilder mb = ab.DefineDynamicModule("DynamicAssembly2.dll");

                this.TB       = mb.DefineType(name, TypeAttributes.Class | TypeAttributes.BeforeFieldInit | TypeAttributes.Public, baseType, _interfaces);
                this.EnvField = TB.DefineField("$Env", typeof(ILuaEnvironment), FieldAttributes.Private);

                // public ctor(ILuaValue[] methods, ILuaValue[] initialValues, LuaEnvironment E, ILuaValue[] ctorArgs, ILuaValue ctor);
                {
                    var temp = new[] { typeof(ILuaValue[]), typeof(ILuaValue[]), typeof(ILuaEnvironment), typeof(ILuaValue[]), typeof(ILuaValue) };
                    ConstructorBuilder ctor = TB.DefineConstructor(
                        MethodAttributes.Public | MethodAttributes.HideBySig,
                        CallingConventions.Standard,
                        temp);
                    this.CtorGen = ctor.GetILGenerator();

                    // base();
                    CtorGen.Emit(OpCodes.Ldarg_0);
                    CtorGen.Emit(OpCodes.Call, (baseType ?? typeof(object)).GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[0], null));

                    // this.$Env = E
                    CtorGen.Emit(OpCodes.Ldarg_0);
                    CtorGen.Emit(OpCodes.Ldarg_3);
                    CtorGen.Emit(OpCodes.Stfld, EnvField);
                }
            }
示例#24
0
        public void MetaData_BeforeActivation()
        {
            //Elimina dal combo Column Name i campi già classificati
            foreach (DataRow Present in SourceTable.Select())
            {
                if (Present["colname"].ToString() == "")
                {
                    continue;
                }
                if (Present == SourceRow)
                {
                    continue;
                }
                string filter = "(tablename='" + Present["objectname"] + "')AND" +
                                "(field='" + Present["colname"] + "')";

                DataRow [] todelete = DS.columntypesprincipale.Select(filter);
                if (todelete.Length > 0)
                {
                    todelete[0].Delete();
                }
            }
            DS.columntypesprincipale.AcceptChanges();

            //Elimina dal combo RealTable le tabelle non facenti parte della vista
            DataRow [] AllTB = DS.customobject.Select("objectname<>''");
            foreach (DataRow TB in AllTB)
            {
                //if (TB["objectname"].ToString()=="") continue;
                string filter = "(name='dbo." + TB["objectname"] + "')";
                if (AllowedColumns.Select(filter).Length > 0)
                {
                    continue;
                }
                TB.Delete();
                TB.AcceptChanges();
            }
        }
示例#25
0
        private void AccPasswordStorageMenu_Click(object sender, EventArgs e)
        {
            ClearForm();

            TB      tb            = new TB(310, mainY - 50, "", false, 150);
            TextBox tbNewPassword = tb.create();

            tbNewPassword.PasswordChar = '*';
            tbNewPassword.TextAlign    = HorizontalAlignment.Center;
            this.Controls.Add(tbNewPassword);
            tb = new TB(310, mainY - 25, "", false, 150);
            TextBox tbNewPassCopy = tb.create();

            tbNewPassCopy.PasswordChar = '*';
            tbNewPassCopy.TextAlign    = HorizontalAlignment.Center;
            this.Controls.Add(tbNewPassCopy);

            BTN    btn           = new BTN(310, mainY + 25, 150, "Change");
            Button btnChangePass = btn.create();

            this.Controls.Add(btnChangePass);
            btnChangePass.Click += new EventHandler(btnChangePass_Click);
        }
示例#26
0
        public ActionResult CreditSumCount(string userID)
        {
            //SplitPage sp = new SplitPage();

            //List<CreditWriteEntity> list = creditwritebll.GetList(sp).ToList<CreditWriteEntity>()
            //if(list==null||list.Count<=0)
            //{

            //}

            string    sql = "select * from CR_CreditWrite where userID='" + userID + "'";
            DataTable tt  = SxSqlHelperBLL.GetIRepository().FindTable(sql);

            if (TB.CheckTB(tt))
            {
                System.Threading.Thread.Sleep(1 * 1000);
                return(Success("操作完成"));
            }
            else
            {
                return(Error("当前用户没有信用记录"));
            }
        }
示例#27
0
        public ActionResult SaveForm(string keyValue, CreditWriteEntity entity)
        {
            int iyear = entity.iYear.ToInt();

            if (iyear <= 0)
            {
                return(Error("年度录入不正确"));
            }
            string sql = "select id from CR_CreditWrite where userID='" + entity.userID + "' and iYear='" + iyear + "' ";

            if (keyValue.ToStringV() != Str.Empty)
            {
                sql += " and id!='" + keyValue + "'";
            }
            DataTable tt = SxSqlHelperBLL.FindTable(sql);

            if (TB.CheckTB(tt))
            {
                return(Error("用户[" + entity.userName + "]年度[" + iyear.ToString() + "]信息已经存在,不能重复录入"));
            }
            creditwritebll.SaveForm(keyValue, entity);
            return(Success("操作成功。"));
        }
示例#28
0
 protected override IActionContainer GetDefaultContainer()
 {
     return(TB.FindActionContainerById("View"));
 }
示例#29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MapData md = new MapData(this.FK_MapData);

            this.Title = md.Name + " - 设计一对多";
            MapM2M m2m = new MapM2M(this.FK_MapData, this.NoOfObj);

            if (m2m.HisM2MType == M2MType.M2MM)
            {
                this.Response.Redirect("MapM2MM.aspx?FK_MapData=" + this.FK_MapData + "&NoOfObj=" + this.NoOfObj, true);
                return;
            }

            this.Pub1.AddTable();
            this.Pub1.AddCaptionLeft("一对多属性");
            int idx = 1;

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("编号");
            TB tb = new TB();

            tb.ID   = "TB_" + MapM2MAttr.NoOfObj;
            tb.Text = m2m.NoOfObj;
            if (m2m.IsExits)
            {
                tb.Enabled = false;
            }

            this.Pub1.AddTD(tb);
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("描述");
            tb         = new TB();
            tb.ID      = "TB_" + MapM2MAttr.Name;
            tb.Text    = m2m.Name;
            tb.Columns = 50;
            this.Pub1.AddTD("colspan=2", tb);
            this.Pub1.AddTREnd();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("主体数据源<font color=red>*</font>");
            tb          = new TB();
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 3;
            tb.ID       = "TB_" + MapM2MAttr.DBOfObjs;
            tb.Text     = m2m.DBOfObjs;
            tb.Columns  = 50;

            this.Pub1.AddTD("colspan=2", tb);
            this.Pub1.AddTREnd();
            this.Pub1.AddTREnd();


            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("分组数据源");
            tb          = new TB();
            tb.ID       = "TB_" + MapM2MAttr.DBOfGroups;
            tb.Text     = m2m.DBOfGroups;
            tb.Columns  = 50;
            tb.TextMode = TextBoxMode.MultiLine;
            tb.Rows     = 3;
            this.Pub1.AddTD("colspan=2", tb);
            this.Pub1.AddTREnd();
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("框架宽度");
            tb          = new TB();
            tb.ID       = "TB_" + MapM2MAttr.W;
            tb.ShowType = TBType.Num;
            tb.Text     = m2m.W.ToString();
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("框架高度");
            tb          = new TB();
            tb.ID       = "TB_" + MapM2MAttr.H;
            tb.ShowType = TBType.Num;
            tb.Text     = m2m.H.ToString();
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("记录呈现列数");
            tb          = new TB();
            tb.ID       = "TB_" + MapM2MAttr.Cols;
            tb.ShowType = TBType.Num;
            tb.Text     = m2m.Cols.ToString();
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("显示方式");
            DDL ddl = new DDL();

            ddl.ID = "DDL_" + MapM2MAttr.ShowWay;
            ddl.BindSysEnum("FrmUrlShowWay", (int)m2m.ShowWay);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD("请参考手册");
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("权限");
            this.Pub1.AddTDBegin("colspan=2");

            CheckBox cb = new CheckBox();

            cb.Checked = m2m.IsDelete;
            cb.Text    = "是否可以删除?";
            cb.ID      = "CB_IsDelete";
            this.Pub1.Add(cb);

            cb         = new CheckBox();
            cb.Checked = m2m.IsDelete;
            cb.Text    = "是否可以增加?";
            cb.ID      = "CB_IsInsert";
            this.Pub1.Add(cb);
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();

            GroupFields gfs = new GroupFields(md.No);

            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("显示在分组");
            ddl    = new DDL();
            ddl.ID = "DDL_GroupField";
            ddl.BindEntities(gfs, GroupFieldAttr.OID, GroupFieldAttr.Lab, false, AddAllLocation.None);
            ddl.SetSelectItem(m2m.GroupID);
            this.Pub1.AddTD("colspan=2", ddl);
            this.Pub1.AddTREnd();

            this.Pub1.AddTRSum();
            this.Pub1.AddTDBegin("colspan=4 align=center");

            Button btn = new Button();

            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            btn.Text     = " 保存 ";
            btn.Click   += new EventHandler(btn_Save_Click);
            this.Pub1.Add(btn);

            btn          = new Button();
            btn.CssClass = "Btn";
            btn.ID       = "Btn_SaveAndClose";
            btn.Text     = " 保存并关闭 ";
            btn.Click   += new EventHandler(btn_Save_Click);
            this.Pub1.Add(btn);

            if (m2m.IsExits)
            {
                btn          = new Button();
                btn.CssClass = "Btn";
                btn.ID       = "Btn_Del";
                btn.Text     = "删除";
                btn.Attributes["onclick"] = " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Del_Click);
                this.Pub1.Add(btn);
            }

            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();
            this.Pub1.AddTableEnd();

            this.Pub1.AddFieldSet("SQL事例");
            this.Pub1.Add("主体数据源:");
            this.Pub1.AddBR("SELECT No,Name,FK_Dept FROM Port_Emp");
            this.Pub1.AddBR();
            this.Pub1.Add("分组数据源:");
            this.Pub1.AddBR("SELECT No,Name FROM Port_Dept ");
            this.Pub1.AddFieldSetEnd();
        }
示例#30
0
 public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
 {
     base.gaxb_final(element, _parent, args);
 }
示例#31
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //this.Response.Redirect("ImpTableField1504.aspx?EnsName=" + this.FK_MapData,
            //    true);
            //return;

            #region 第1步.
            if (this.Step == 1)
            {
                BP.Sys.SFDBSrcs ens = new BP.Sys.SFDBSrcs();
                ens.RetrieveAll();

                Pub1.AddTable("class='Table' cellSpacing='0' cellPadding='0'  border='0' style='width:100%'");
                Pub1.AddTR();
                Pub1.AddTDGroupTitle("", "第1步:请选择数据源");
                Pub1.AddTREnd();

                Pub1.AddTR();
                Pub1.AddTDBegin();
                Pub1.AddUL("class='navlist'");

                foreach (BP.Sys.SFDBSrc item in ens)
                {
                    Pub1.AddLi("<div><a href='ImpTableField.aspx?Step=2&FK_MapData=" + this.FK_MapData + "&FK_SFDBSrc=" + item.No + "'><span class='nav'>" + item.No + "  -  " + item.Name + "</span></a></div>");
                }

                Pub1.AddLi("<div><a href=\"javascript:WinOpen('/WF/Comm/RefFunc/UIEn.aspx?EnsName=BP.Sys.SFDBSrcs')\" ><img src='../Img/New.gif' align='middle' /><span class='nav'>新建数据源</span></a></div>");

                Pub1.AddULEnd();
                Pub1.AddTDEnd();
                Pub1.AddTREnd();
                Pub1.AddTableEnd();
            }
            #endregion 第1步.

            #region 第2步.
            if (this.Step == 2)
            {
                SFDBSrc src = new SFDBSrc(this.FK_SFDBSrc);

                this.Pub1.Add("<div class='easyui-layout' data-options=\"fit:true\">");
                this.Pub1.Add(string.Format("<div data-options=\"region:'west',split:true,title:'选择 {0} 数据表/视图'\" style='width:200px;'>",
                                            src.DBName));

                DataTable dt = src.GetTables();
                this.Pub1.AddUL();
                foreach (DataRow dr in dt.Rows)
                {
                    string url = "?Step=" + this.Step + "&FK_MapData=" + this.FK_MapData + "&FK_SFDBSrc=" + this.FK_SFDBSrc + "&STable=" + dr["No"].ToString();
                    if (dr["No"].ToString() == this.STable)
                    {
                        this.Pub1.Add("<li><font color=red><b>" + dr["Name"] + "</font></b></li>");
                    }
                    else
                    {
                        this.Pub1.Add("<li><a href='" + url + "' >" + dr["Name"] + "</a></li>");
                    }
                }
                this.Pub1.AddULEnd();

                Pub1.AddDivEnd();

                this.Pub1.Add("<div data-options=\"region:'center',title:'第2步:请选择要导入的数据列(" + this.STable + ")'\" style='padding:5px;'>");

                //加载选中数据表/视图的列信息
                this.Pub1.AddTable(); // ("id='maintable' class='Table' cellSpacing='0' cellPadding='0'  border='0' style='width:100%'");
                this.Pub1.AddTR();

                var cb = new CheckBox();
                cb.ID = "CB_CheckAll";
                cb.Attributes["onclick"] = "CheckAll(this.checked)";

                this.Pub1.AddTDGroupTitle("style='width:40px;text-align:center'", cb);
                this.Pub1.AddTDGroupTitle("序");
                this.Pub1.AddTDGroupTitle("字段名");
                this.Pub1.AddTDGroupTitle("中文描述");
                this.Pub1.AddTDGroupTitle("style='width:80px;text-align:center'", "类型");
                this.Pub1.AddTDGroupTitle("style='width:50px;text-align:center'", "最大长度");
                this.Pub1.AddTREnd();

                MapAttrs attrs  = new MapAttrs(this.FK_MapData);
                bool     isHave = false;

                var tableColumns = src.GetColumns(this.STable);
                foreach (DataRow dr in tableColumns.Rows)
                {
                    cb         = new CheckBox();
                    cb.ID      = "CB_Col_" + dr["name"];
                    cb.Checked = this.SColumns == null ? false : this.SColumns.Contains(dr["name"] + ",");

                    //如果已经有该字段,就放弃.
                    if (attrs.Contains(MapAttrAttr.KeyOfEn, dr["name"].ToString()))
                    {
                        continue;
                        cb.Enabled = false;
                    }

                    this.Pub1.AddTR();
                    this.Pub1.AddTD(cb);
                    this.Pub1.AddTD(dr["colid"].ToString());
                    this.Pub1.AddTD(dr["name"].ToString());
                    this.Pub1.AddTD(dr["Desc"].ToString());
                    this.Pub1.AddTD(dr["type"].ToString());
                    this.Pub1.AddTD(Convert.ToInt32(dr["length"]));
                    this.Pub1.AddTREnd();
                }


                this.Pub1.AddTableEnd();
                this.Pub1.AddBR();
                this.Pub1.AddBR();
                this.Pub1.AddSpace(1);

                var btn = new LinkBtn(false, NamesOfBtn.Next, "下一步");
                btn.Click += new EventHandler(btn_Click);
                this.Pub1.Add(btn);
                this.Pub1.AddSpace(1);

                this.Pub1.Add(string.Format("<a href='{0}?Step=1&FK_MapData={1}' class='easyui-linkbutton'>上一步</a>", Request.Url.AbsolutePath, this.FK_MapData));
                this.Pub1.AddBR();
                this.Pub1.AddBR();
                this.Pub1.AddDivEnd();
                this.Pub1.AddDivEnd();
            }
            #endregion 第2步.

            #region 第3步.
            if (this.Step == 3)
            {
                SFDBSrc src = new SFDBSrc(this.FK_SFDBSrc);
                this.Pub1.AddTable(); // ("id='maintable' class='Table' cellSpacing='0' cellPadding='0' border='0' style='width:100%'");
                this.Pub1.AddTDGroupTitle("序");
                this.Pub1.AddTDGroupTitle("字段名");
                this.Pub1.AddTDGroupTitle("中文描述");
                this.Pub1.AddTDGroupTitle("数据类型");
                this.Pub1.AddTDGroupTitle("逻辑类型");
                this.Pub1.AddTDGroupTitle("绑定值(双击选择)");
                this.Pub1.AddTDGroupTitle("最大长度");
                this.Pub1.AddTDGroupTitle("顺序");
                this.Pub1.AddTREnd();

                var tableColumns = src.GetColumns(this.STable);
                var idx          = 0;

                foreach (DataRow dr in tableColumns.Rows)
                {
                    if (this.SColumns.Contains(dr["name"] + ",") == false)
                    {
                        continue;
                    }

                    string typeString = dr["type"].ToString().ToLower();
                    int    mydatatype = 1;
                    if (typeString.Contains("int"))
                    {
                        mydatatype = BP.DA.DataType.AppInt;
                    }
                    if (typeString.Contains("float"))
                    {
                        mydatatype = BP.DA.DataType.AppFloat;
                    }
                    if (typeString.Contains("double"))
                    {
                        mydatatype = BP.DA.DataType.AppDouble;
                    }

                    idx++;
                    this.Pub1.AddTR();
                    this.Pub1.AddTDIdx(idx);
                    this.Pub1.AddTD(dr["name"].ToString());

                    //中文描述.
                    var tb = new TB();
                    tb.ID      = "TB_Desc_" + dr["name"];
                    tb.Columns = 20;
                    tb.Text    = dr["Desc"].ToString();
                    if (tb.Text.Length == 0)
                    {
                        tb.Text = dr["name"].ToString();
                    }
                    this.Pub1.AddTD(tb);

                    //数据类型.
                    var ddl = new DDL();
                    ddl.ID = "DDL_DBType_" + dr["name"];
                    ddl.SelfBindSysEnum(MapAttrAttr.MyDataType);
                    ddl.SetSelectItem(mydatatype); //设置选择的项目.
                    this.Pub1.AddTD(ddl);

                    //逻辑类型.
                    ddl    = new DDL();
                    ddl.ID = "DDL_LogicType_" + dr["name"];
                    ddl.SelfBindSysEnum(MapAttrAttr.LGType);
                    this.Pub1.AddTD(ddl);


                    //绑定的逻辑类型.
                    tb         = new TB();
                    tb.ID      = "TB_BindKey_" + dr["name"];
                    tb.Columns = 30;
                    tb.Text    = dr["name"].ToString();
                    tb.Attributes["ondblclick"] = "OpenSelectBindKey(this)";
                    this.Pub1.AddTD(tb);

                    //最大长度.
                    //绑定的逻辑类型.
                    tb         = new TB();
                    tb.ID      = "TB_Len_" + dr["name"];
                    tb.Columns = 5;
                    tb.Text    = dr["length"].ToString();
                    this.Pub1.AddTD(tb);

                    this.Pub1.AddTDBegin("style='text-align:center'");
                    var hiddenIdx = new HiddenField();
                    hiddenIdx.ID    = "HID_Idx_" + dr["name"];
                    hiddenIdx.Value = idx.ToString();
                    this.Pub1.Add(hiddenIdx);

                    this.Pub1.Add("<a href='javascript:void(0)' onclick='up(this, 6)' class='easyui-linkbutton' data-options=\"iconCls:'icon-up'\"></a>&nbsp;");
                    this.Pub1.Add("<a href='javascript:void(0)' onclick='down(this, 6)' class='easyui-linkbutton' data-options=\"iconCls:'icon-down'\"></a>");

                    this.Pub1.AddTDEnd();
                    this.Pub1.AddTREnd();
                }

                this.Pub1.AddTableEnd();
                this.Pub1.AddBR();
                this.Pub1.AddBR();
                this.Pub1.AddSpace(1);

                var btn = new LinkBtn(false, NamesOfBtn.Save, "导入字段,生成表单");
                btn.Click += new EventHandler(btn_Save_Click);
                this.Pub1.Add(btn);
                this.Pub1.AddSpace(1);

                this.Pub1.Add(string.Format("<a href='{0}' class='easyui-linkbutton'>上一步</a>", Request.Url.ToString().Replace("Step=3", "Step=2")));
                this.Pub1.AddBR();
                this.Pub1.AddBR();
            }
            #endregion 第3步.
        }
示例#32
0
        /// <summary>
        /// 设置委托
        /// </summary>
        private void Author_Set()
        {
            if (string.IsNullOrEmpty(WebUser.No))
            {
                return;
            }
            this.Pub1.AddFieldSet("设置委托");

            Label lbl_Author_No = new Label();

            lbl_Author_No.Text = "接受委托人账号:";
            lbl_Author_No.ID   = "lbl_Login_No";
            this.Pub1.Add(lbl_Author_No);

            TB TB_Author_No = new TB();

            TB_Author_No.ID    = "TB_Author_No";
            TB_Author_No.Width = 100;
            this.Pub1.Add(TB_Author_No);

            DDL ddl_AuthorWay = new DDL();

            ddl_AuthorWay.ID = "ddl_AuthorWay";

            ListItem item = new ListItem();

            item.Value = "0";
            item.Text  = "无";
            ddl_AuthorWay.Items.Add(item);

            item       = new ListItem();
            item.Value = "1";
            item.Text  = "全部流程";
            ddl_AuthorWay.Items.Add(item);

            item       = new ListItem();
            item.Value = "2";
            item.Text  = "指定流程";
            ddl_AuthorWay.Items.Add(item);
            this.Pub1.Add(ddl_AuthorWay);

            Label lbl_Author_FlowNos = new Label();

            lbl_Author_FlowNos.Text = "流程编号(格式:,001,002):";
            lbl_Author_FlowNos.ID   = "lbl_Author_FlowNos";
            this.Pub1.Add(lbl_Author_FlowNos);

            TB TB_Author_FlowNos = new TB();

            TB_Author_FlowNos.ID    = "TB_Author_FlowNos";
            TB_Author_FlowNos.Width = 100;
            this.Pub1.Add(TB_Author_FlowNos);

            Btn btn_Author_Set = new Btn();

            btn_Author_Set.ID     = "btn_Author_Set";
            btn_Author_Set.Text   = "保存";
            btn_Author_Set.Width  = 45;
            btn_Author_Set.Click += new EventHandler(btn_Author_Set_Click);
            this.Pub1.Add(btn_Author_Set);

            this.Pub1.AddFieldSetEndBR();
        }
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final (element, _parent, args);

        string attr;

        if (element != null) {
            attr = element.GetAttribute ("regexValidation");
            if (attr != null) {
                regexValidation = attr;
            }

            attr = element.GetAttribute("onValueChanged");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { onValueChanged = (attr); }

            attr = element.GetAttribute("placeholder");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { placeholder = (attr); }

            attr = element.GetAttribute("characterLimit");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { characterLimit = (int)float.Parse(attr); }

            attr = element.GetAttribute("asteriskChar");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { asteriskChar = char.Parse(attr); }

            attr = element.GetAttribute("contentType");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { contentType = (PlanetUnity2.InputFieldContentType)System.Enum.Parse(typeof(PlanetUnity2.InputFieldContentType), attr); }

            attr = element.GetAttribute("lineType");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { lineType = (PlanetUnity2.InputFieldLineType)System.Enum.Parse(typeof(PlanetUnity2.InputFieldLineType), attr); }

            attr = element.GetAttribute("selectionColor");
            if(attr != null) { attr = PlanetUnityOverride.processString(_parent, attr); }
            if(attr != null) { selectionColor = new Color().PUParse(attr); }

        }
    }
示例#34
0
        public void BindEdit(MapData md, MapDtl dtl)
        {
            this.Pub1.AddTable();
            this.Pub1.AddCaptionLeft("从表属性");
            this.Pub1.AddTR();
            this.Pub1.AddTDTitle("ID");
            this.Pub1.AddTDTitle("项目");
            this.Pub1.AddTDTitle("采集");
            this.Pub1.AddTDTitle("备注");
            this.Pub1.AddTREnd();

            int idx = 1;

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("表英文名称");
            TB tb = new TB();

            tb.ID   = "TB_No";
            tb.Text = dtl.No;
            if (this.DoType == "Edit")
            {
                tb.Enabled = false;
            }
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD();
            //this.Pub1.AddTD("英文名称全局唯一");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("表中文名称");
            tb      = new TB();
            tb.ID   = "TB_Name";
            tb.Text = dtl.Name;
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD("XX 从表");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("物理表名");
            tb      = new TB();
            tb.ID   = "TB_PTable";
            tb.Text = dtl.PTable;

            this.Pub1.AddTD(tb);
            this.Pub1.AddTD();
            //this.Pub1.AddTD("存储数据的物理表名称");
            //  this.Pub1.AddTD("存储数据的物理表名称");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("操作权限");
            DDL ddl = new DDL();

            ddl.BindSysEnum(MapDtlAttr.DtlOpenType, (int)dtl.DtlOpenType);
            ddl.ID = "DDL_DtlOpenType";
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD();
            // this.Pub1.AddTD("用于从表的权限控制");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            CheckBox cb = new CheckBox();

            cb.ID      = "CB_IsView";
            cb.Text    = "是否可见";
            cb.Checked = dtl.IsView;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsUpdate";
            cb.Text    = "是否可以修改行"; // "是否可以修改行";
            cb.Checked = dtl.IsUpdate;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsInsert";
            cb.Text    = "是否可以新增行"; // "是否可以新增行";
            cb.Checked = dtl.IsInsert;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_IsDelete";
            cb.Text    = "是否可以删除行"; // "是否可以删除行";
            cb.Checked = dtl.IsDelete;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsShowIdx";
            cb.Text    = "是否显示序号列"; //"是否显示序号列";
            cb.Checked = dtl.IsShowIdx;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsShowSum";
            cb.Text    = "是否合计行";// "是否合计行";
            cb.Checked = dtl.IsShowSum;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_IsShowTitle";
            cb.Text    = "是否显示标头";// "是否显示标头";
            cb.Checked = dtl.IsShowTitle;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsExp";
            cb.Text    = "是否可以导出?";// "是否可以导出";
            cb.Checked = dtl.IsShowTitle;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsImp";
            cb.Text    = "是否可以导入?";// "是否可以导出";
            cb.Checked = dtl.IsShowTitle;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_IsCopyNDData";
            cb.Text    = "是允许从上一个节点Copy数据";
            cb.Checked = dtl.IsCopyNDData;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_IsHLDtl";
            cb.Text    = "是否是合流汇总从表(当前节点是合流节点有效)";
            cb.Checked = dtl.IsHLDtl;
            this.Pub1.AddTD("colspan=2", cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_IsEnableAthM";
            cb.Text    = "是否启用多附件";
            cb.Checked = dtl.IsEnableAthM;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + MapDtlAttr.IsEnableM2M;
            cb.Text    = "是否启用一对多";
            cb.Checked = dtl.IsEnableM2M;
            this.Pub1.AddTD(cb);

            cb         = new CheckBox();
            cb.ID      = "CB_" + MapDtlAttr.IsEnableM2MM;
            cb.Text    = "是否启用一对多多";
            cb.Checked = dtl.IsEnableM2MM;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            cb         = new CheckBox();
            cb.ID      = "CB_IsEnablePass";
            cb.Text    = "是否起用审核字段?";// "是否合计行";
            cb.Checked = dtl.IsEnablePass;
            this.Pub1.AddTD(cb);
            this.Pub1.AddTD();
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();


            //cb = new CheckBox();
            //cb.ID = "CB_IsEnableAth";
            //cb.Text = "是否启用单附件";
            //cb.Checked = dtl.IsEnablePass;
            //this.Pub1.AddTD(cb);
            //this.Pub1.AddTREnd();


            this.Pub1.AddTR1();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("初始化行数");
            tb    = new TB();
            tb.ID = "TB_RowsOfList";
            tb.Attributes["class"] = "TBNum";
            tb.TextExtInt          = dtl.RowsOfList;
            this.Pub1.AddTD(tb);
            this.Pub1.AddTD("");
            this.Pub1.AddTREnd();


            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("显示格式");
            ddl    = new DDL();
            ddl.ID = "DDL_DtlShowModel";
            ddl.BindSysEnum(MapDtlAttr.DtlShowModel, (int)dtl.HisDtlShowModel);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();

            this.Pub1.AddTR();
            this.Pub1.AddTDIdx(idx++);
            this.Pub1.AddTD("越出处理");
            ddl    = new DDL();
            ddl.ID = "DDL_WhenOverSize";
            ddl.BindSysEnum(MapDtlAttr.WhenOverSize, (int)dtl.HisWhenOverSize);
            this.Pub1.AddTD(ddl);
            this.Pub1.AddTD();
            this.Pub1.AddTREnd();

            GroupFields gfs = new GroupFields(md.No);

            if (gfs.Count > 1)
            {
                this.Pub1.AddTR1();
                this.Pub1.AddTDIdx(idx++);
                this.Pub1.AddTD("显示在分组");
                ddl    = new DDL();
                ddl.ID = "DDL_GroupField";
                ddl.BindEntities(gfs, GroupFieldAttr.OID, GroupFieldAttr.Lab, false, AddAllLocation.None);
                ddl.SetSelectItem(dtl.GroupID);
                this.Pub1.AddTD("colspan=2", ddl);
                this.Pub1.AddTREnd();
            }
            if (gfs.Count > 1)
            {
                this.Pub1.AddTR();
            }
            else
            {
                this.Pub1.AddTR1();
            }

            this.Pub1.AddTRSum();
            this.Pub1.AddTD("");
            this.Pub1.AddTDBegin("colspan=3 align=center");

            Button btn = new Button();

            btn.ID       = "Btn_Save";
            btn.CssClass = "Btn";
            btn.Text     = " 保存 ";
            btn.Click   += new EventHandler(btn_Click);
            this.Pub1.Add(btn);

            btn          = new Button();
            btn.ID       = "Btn_SaveAndClose";
            btn.CssClass = "Btn";
            btn.Text     = " 保存并关闭 ";
            btn.Click   += new EventHandler(btn_Click);
            this.Pub1.Add(btn);

            if (this.FK_MapDtl != null)
            {
                //btn = new Button();
                //btn.ID = "Btn_D";
                //btn.Text = this.ToE("DesignSheet", "设计表单"); // "设计表单";
                //btn.Click += new EventHandler(btn_Go_Click);
                //this.Pub1.Add(btn);

                btn          = new Button();
                btn.ID       = "Btn_Del";
                btn.CssClass = "Btn";
                btn.Text     = "删除"; // "删除";
                btn.Attributes["onclick"] = " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Del_Click);
                this.Pub1.Add(btn);


                btn          = new Button();
                btn.ID       = "Btn_New";
                btn.CssClass = "Btn";
                btn.Text     = "新建"; // "删除";
                btn.Click   += new EventHandler(btn_New_Click);
                this.Pub1.Add(btn);

                btn          = new Button();
                btn.ID       = "Btn_MapExt";
                btn.CssClass = "Btn";
                btn.Text     = "扩展设置"; // "删除";

                btn.Click += new EventHandler(btn_MapExt_Click);
                this.Pub1.Add(btn);

                if (dtl.IsEnableAthM)
                {
                    btn          = new Button();
                    btn.CssClass = "Btn";
                    btn.ID       = "Btn_IsEnableAthM";
                    btn.Text     = "附件属性"; // "删除";
                    btn.Click   += new EventHandler(btn_MapAth_Click);
                    this.Pub1.Add(btn);
                }

                // btn = new Button();
                // btn.ID = "Btn_DtlTR";
                // btn.Text = "多表头";
                // btn.Attributes["onclick"] = "javascript:WinOpen('')";
                //// btn.Click += new EventHandler(btn_DtlTR_Click);
                // this.Pub1.Add(btn);
            }
            this.Pub1.AddTDEnd();
            this.Pub1.AddTREnd();
            this.Pub1.AddTableEnd();
        }
        public void DoNew(BillTemplate bill)
        {
            this.Ucsys1.Clear();
            BP.WF.Node nd = new BP.WF.Node(this.NodeID);
            this.Ucsys1.AddTable();
            this.Ucsys1.AddCaptionLeft("<a href='Bill.aspx?FK_Flow=" + this.FK_Flow + "&NodeID=" + this.NodeID + "' >" + "返回" + "</a> - <a href=Bill.aspx?FK_Flow=" + this.FK_Flow + "&NodeID=" + this.NodeID + "&DoType=New ><img  border=0 src='../Img/Btn/New.gif' />新建</a>");
            this.Ucsys1.AddTR();
            this.Ucsys1.AddTDTitle("项目");
            this.Ucsys1.AddTDTitle("输入");
            this.Ucsys1.AddTDTitle("备注");
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTR();
            this.Ucsys1.AddTD("单据类型"); // 单据/单据名称
            DDL ddl = new DDL();

            ddl.ID = "DDL_BillType";

            BP.WF.Data.BillTypes ens = new BillTypes();
            ens.RetrieveAllFromDBSource();

            if (ens.Count == 0)
            {
                BP.WF.Data.BillType enB = new BillType();
                enB.Name    = "新建类型" + "1";
                enB.FK_Flow = this.FK_Flow;
                enB.No      = "01";
                enB.Insert();
                ens.AddEntity(enB);
            }

            ddl.BindEntities(ens);
            ddl.SetSelectItem(bill.FK_BillType);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("<a href='Bill.aspx?FK_Flow=" + this.FK_Flow + "&NodeID=" + this.NodeID + "&DoType=EditType'><img src='../Img/Btn/Edit.gif' border=0/>类别维护</a>");
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTR();
            this.Ucsys1.AddTD("编号");
            TB tb = new TB();

            tb.ID      = "TB_No";
            tb.Text    = bill.No;
            tb.Enabled = false;
            if (tb.Text == "")
            {
                tb.Text = "系统自动生成";
            }

            this.Ucsys1.AddTD(tb);
            this.Ucsys1.AddTD("");
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTR();
            this.Ucsys1.AddTD("名称"); // 单据/单据名称
            tb         = new TB();
            tb.ID      = "TB_Name";
            tb.Text    = bill.Name;
            tb.Columns = 40;
            this.Ucsys1.AddTD("colspan=2", tb);
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTR();
            this.Ucsys1.AddTD("生成的文件类型"); // 单据/单据名称
            ddl    = new DDL();
            ddl.ID = "DDL_BillFileType";
            ddl.BindSysEnum("BillFileType");
            ddl.SetSelectItem((int)bill.HisBillFileType);
            this.Ucsys1.AddTD(ddl);
            this.Ucsys1.AddTD("目前不支持excel,html格式.");
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTR();
            this.Ucsys1.AddTD("单据模板");
            HtmlInputFile file = new HtmlInputFile();

            file.ID = "f";
            file.Attributes["width"] = "100%";
            this.Ucsys1.AddTD("colspan=2", file);
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTRSum();
            this.Ucsys1.Add("<TD class=TD colspan=3 align=center>");
            Button btn = new Button();

            btn.CssClass = "Btn";
            btn.ID       = "Btn_Save";
            btn.Text     = "保存";
            this.Ucsys1.Add(btn);
            btn.Click += new EventHandler(btn_Click);
            this.Ucsys1.Add(btn);
            if (bill.No.Length > 1)
            {
                btn          = new Button();
                btn.ID       = "Btn_Del";
                btn.CssClass = "Btn";
                btn.Text     = "删除"; // "删除单据";
                this.Ucsys1.Add(btn);
                btn.Attributes["onclick"] += " return confirm('您确认吗?');";
                btn.Click += new EventHandler(btn_Del_Click);
            }
            string url      = "";
            string fileType = "";

            if (bill.HisBillFileType == BillFileType.RuiLang)
            {
                fileType = "grf";
            }
            else
            {
                fileType = "rtf";
            }

            if (this.RefNo != null)
            {
                url = "<a href='../../DataUser/CyclostyleFile/" + bill.Url + "." + fileType + "'><img src='../Img/Btn/save.gif' border=0/> 模板下载</a>";
            }

            this.Ucsys1.Add(url + "</TD>");
            this.Ucsys1.AddTREnd();

            this.Ucsys1.AddTable();
        }
示例#36
0
    public override void gaxb_final(TB.TBXMLElement element, object _parent, Hashtable args)
    {
        base.gaxb_final(element, _parent, args);

        string attrib;

        if (font == null) {
            font = DefaultFont;
        }

        if(element != null){
            attrib = element.GetAttribute ("font");
            if (attrib != null) {
                font = attrib;
            }

            attrib = element.GetAttribute ("onLinkClick");
            if (attrib != null) {
                onLinkClick = PlanetUnityOverride.processString (_parent, attrib);
            }

            attrib = element.GetAttribute ("fontSize");
            if (attrib != null) {
                fontSize = (int)(float.Parse (PlanetUnityOverride.processString (_parent, attrib)));
            }

            attrib = element.GetAttribute ("fontStyle");
            if (attrib != null) {
                fontStyle = attrib;
            }

            attrib = element.GetAttribute ("sizeToFit");
            if (attrib != null) {
                sizeToFit = bool.Parse (PlanetUnityOverride.processString(_parent, attrib));
            }

            attrib = element.GetAttribute ("maxSize");
            if (attrib != null) {
                maxSize = (int)(float.Parse (PlanetUnityOverride.processString(_parent, attrib)));
            }

            attrib = element.GetAttribute ("enableWordWrapping");
            if (attrib != null) {
                enableWordWrapping = bool.Parse (attrib);
            }

            attrib = element.GetAttribute ("maxVisibleLines");
            if (attrib != null) {
                maxVisibleLines = int.Parse (attrib);
            }

            attrib = element.GetAttribute ("minSize");
            if (attrib != null) {
                minSize = (int)(float.Parse (PlanetUnityOverride.processString(_parent, attrib)));
            }

            attrib = element.GetAttribute ("alignment");
            if (attrib != null) {
                alignment = (TextAlignmentOptions)Enum.Parse (typeof(TextAlignmentOptions), attrib);
            }

            attrib = element.GetAttribute ("fontColor");
            if (attrib != null) {
                fontColor = fontColor.PUParse (attrib);
            }

            attrib = element.GetAttribute ("overflowMode");
            if (attrib != null) {
                overflowMode = (TextOverflowModes)Enum.Parse(typeof(TextOverflowModes), attrib);
            }

            attrib = element.GetAttribute ("lineSpacing");
            if (attrib != null) {
                lineSpacing = (int)(float.Parse (PlanetUnityOverride.processString(_parent, attrib)));
            }

            value = element.GetAttribute ("value");
            value = PlanetUnityOverride.processString (_parent, value);
        }
    }