Ejemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        add_trip_info inf = new add_trip_info();
        add_trip_sp   sp  = new add_trip_sp();

        inf.Regn_no  = txtregno.Text;
        inf.From     = txtfrom.Text;
        inf.To       = txtto.Text;
        inf.Time     = (DD1.SelectedItem.ToString() + ":" + DD2.SelectedItem.ToString() + " " + ddlapm.SelectedItem.ToString());
        inf.Trip_no  = int.Parse(txttripno.Text);
        inf.Category = ddlcategory.SelectedItem.ToString();
        inf.Day      = ddlday.SelectedItem.ToString();
        inf.Towards  = TextBox1.Text;
        sp.Add(inf);

        txtfrom.Text  = "";
        txtregno.Text = "";

        txtto.Text     = "";
        txttripno.Text = "";
        ddlday.ClearSelection();
        ddlcategory.ClearSelection();
        ddlapm.ClearSelection();
        DD2.ClearSelection();
        DD1.ClearSelection();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            txtfrom.Text  = "";
            txtregno.Text = "";

            txtto.Text     = "";
            txttripno.Text = "";
            ddlday.ClearSelection();
            ddlcategory.ClearSelection();
            ddlapm.ClearSelection();
            DD2.ClearSelection();
            DD1.ClearSelection();
        }
    }
        protected void DD1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(DD1.SelectedIndex) + 1;

            try
            {
                b1.kapat();
                b1.ac();
                SqlCommand     bag1         = new SqlCommand("Select id,ilce from Ilceler where sehir='" + id + "' ", b1.baglanti);
                SqlDataAdapter DataAdapter1 = new SqlDataAdapter(bag1);
                DataSet        DataSet1     = new DataSet();
                DataAdapter1.Fill(DataSet1);
                DD2.DataSource     = DataSet1;
                DD2.DataTextField  = "ilce";
                DD2.DataValueField = "id";
                DD2.DataBind();

                DataSet1.Clear();
                b1.kapat();
            }
            catch (Exception)
            {
            }
        }
Ejemplo n.º 4
0
        private bool Applychk(BinaryReader br)
        {
            CHKToken cHKToken = GetNextCHK(br);

            br.BaseStream.Position = cHKToken.start;



            //Byte로부터 에디터로 넣는 함수
            switch (cHKToken.tokentype)
            {
            case TOKENTYPE.ENCD:
                SetEncoding(br.ReadInt32());

                break;

            case TOKENTYPE.IOWN:
                IOWN = br.ReadBytes(12);

                break;

            case TOKENTYPE.OWNR:
                //넘기기
                OWNR = br.ReadBytes(12);

                break;

            case TOKENTYPE.SIDE:
                SIDE = br.ReadBytes(12);

                break;

            case TOKENTYPE.ERA:
                ushort tile = br.ReadUInt16();
                if (tile > 7)
                {
                    throw new Exception("");
                }
                TILETYPE = (TileType)tile;


                break;

            case TOKENTYPE.COLR:
                COLR = br.ReadBytes(8);
                for (int i = 0; i < 8; i++)
                {
                    if (COLR[i] >= ColorName.Count())
                    {
                        COLR[i] = 0;
                    }


                    CRGB[i] = new Microsoft.Xna.Framework.Color(0, 0, COLR[i]);
                }


                break;

            case TOKENTYPE.CRGB:
                for (int i = 0; i < 8; i++)
                {
                    byte[] colors = br.ReadBytes(3);
                    CRGB[i] = new Microsoft.Xna.Framework.Color(colors[0], colors[1], colors[2]);
                }
                CRGBIND = br.ReadBytes(8);

                break;

            case TOKENTYPE.UNIT:
                UNIT.Clear();
                for (int i = 0; i < cHKToken.size / 36; i++)
                {
                    CUNIT cUNIT = new CUNIT(br);
                    cUNIT.SetMapEditor(mapEditor);
                    UNIT.Add(cUNIT);
                }

                break;

            case TOKENTYPE.DIM:
                WIDTH  = br.ReadUInt16();
                HEIGHT = br.ReadUInt16();
                break;

            case TOKENTYPE.TILE:
                TILE = new ushort[cHKToken.size / 2];
                for (int i = 0; i < cHKToken.size / 2; i++)
                {
                    TILE[i] = br.ReadUInt16();
                }

                break;

            case TOKENTYPE.MTXM:
                MTXM = new ushort[cHKToken.size / 2];
                for (int i = 0; i < cHKToken.size / 2; i++)
                {
                    MTXM[i] = br.ReadUInt16();
                }

                break;

            case TOKENTYPE.DD2:
                for (int i = 0; i < cHKToken.size / 8; i++)
                {
                    CDD2 cDD2 = new CDD2(br, this);

                    DD2.Add(cDD2);
                }
                break;

            case TOKENTYPE.THG2:
                for (int i = 0; i < cHKToken.size / 10; i++)
                {
                    CTHG2 cTHG2 = new CTHG2(br);

                    THG2.Add(cTHG2);
                }

                break;

            case TOKENTYPE.MASK:
                MASK = br.ReadBytes((int)cHKToken.size);

                break;

            case TOKENTYPE.STR:
            {
                long startpoint = br.BaseStream.Position;

                LOADSTR = new string[br.ReadUInt16()];
                BYTESTR = new List <byte[]>();

                ushort[] ptrs = new ushort[LOADSTR.Length];
                for (int i = 0; i < ptrs.Length; i++)
                {
                    ptrs[i] = br.ReadUInt16();
                }


                for (int i = 0; i < ptrs.Length; i++)
                {
                    br.BaseStream.Position = startpoint + ptrs[i];

                    List <byte> strs     = new List <byte>();
                    byte        readbyte = br.ReadByte();


                    if (readbyte != 0)
                    {
                        strs.Add(readbyte);
                        while (true)
                        {
                            readbyte = br.ReadByte();
                            if (readbyte == 0)
                            {
                                break;
                            }
                            strs.Add(readbyte);
                        }
                    }


                    BYTESTR.Add(strs.ToArray());

                    //LOADSTR[i] = System.Text.Encoding.GetEncoding(949).GetString(strs.ToArray());
                }
            }
            break;

            case TOKENTYPE.STRx:
            {
                long startpoint = br.BaseStream.Position;

                LOADSTRx = new string[br.ReadUInt32()];
                BYTESTRx = new List <byte[]>();

                uint[] ptrs = new uint[LOADSTRx.Length];
                for (int i = 0; i < ptrs.Length; i++)
                {
                    ptrs[i] = br.ReadUInt32();
                }


                for (int i = 0; i < ptrs.Length; i++)
                {
                    br.BaseStream.Position = startpoint + ptrs[i];

                    List <byte> strs     = new List <byte>();
                    byte        readbyte = br.ReadByte();

                    if (readbyte != 0)
                    {
                        strs.Add(readbyte);
                        while (true)
                        {
                            readbyte = br.ReadByte();
                            if (readbyte == 0)
                            {
                                break;
                            }
                            strs.Add(readbyte);
                        }
                    }


                    BYTESTRx.Add(strs.ToArray());

                    //LOADSTRx[i] = System.Text.Encoding.UTF8.GetString(strs.ToArray());
                }
            }
            break;

            case TOKENTYPE.SPRP:
                SCEARIONAME = new StringData(this, br.ReadUInt16());
                SCEARIODES  = new StringData(this, br.ReadUInt16());


                break;

            case TOKENTYPE.FORC:
                FORCE = br.ReadBytes(8);

                FORCENAME    = new StringData[4];
                FORCENAME[0] = new StringData(this, br.ReadUInt16());
                FORCENAME[1] = new StringData(this, br.ReadUInt16());
                FORCENAME[2] = new StringData(this, br.ReadUInt16());
                FORCENAME[3] = new StringData(this, br.ReadUInt16());

                FORCEFLAG = br.ReadBytes(4);
                break;

            case TOKENTYPE.MRGN:
                LocationDatas.Clear();
                LocationDatas.Add(new LocationData(mapEditor));
                for (int i = 0; i < 255; i++)
                {
                    LocationData locationData = new LocationData(mapEditor);

                    locationData.INDEX = i + 1;

                    locationData.L      = br.ReadUInt32();
                    locationData.T      = br.ReadUInt32();
                    locationData.R      = br.ReadUInt32();
                    locationData.B      = br.ReadUInt32();
                    locationData.STRING = new StringData(this, br.ReadUInt16());
                    locationData.FLAG   = br.ReadUInt16();

                    if (locationData.L == 0 & locationData.T == 0 & locationData.L == 0 & locationData.T == 0 &
                        locationData.STRING.LoadedIndex == -1 & locationData.FLAG == 0)
                    {
                        continue;
                    }


                    LocationDatas.Add(locationData);
                }
                //u32: Left(X1) coordinate of location, in pixels(usually 32 pt grid aligned)
                //u32: Top(Y1) coordinate of location, in pixels
                //u32: Right(X2) coordinate of location, in pixels
                //u32: Bottom(Y2) coordinate of location, in pixels
                //u16: String number of the name of this location
                //u16: Location elevation flags.If an elevation is disabled in the location, it's bit will be on (1)
                //Bit 0 - Low elevation
                //Bit 1 - Medium elevation
                //Bit 2 - High elevation
                //Bit 3 - Low air
                //Bit 4 - Medium air
                //Bit 5 - High air
                //Bit 6 - 15 - Unused


                break;

            case TOKENTYPE.UPRP:
                UPRP = new CUPRP[64];
                for (int i = 0; i < 64; i++)
                {
                    CUPRP cUPRP = new CUPRP();
                    cUPRP.STATUSVALID = br.ReadUInt16();
                    cUPRP.POINTVALID  = br.ReadUInt16();

                    cUPRP.PLAYER      = br.ReadByte();
                    cUPRP.HITPOINT    = br.ReadByte();
                    cUPRP.SHIELDPOINT = br.ReadByte();
                    cUPRP.ENERGYPOINT = br.ReadByte();


                    cUPRP.RESOURCE   = br.ReadUInt32();
                    cUPRP.HANGAR     = br.ReadUInt16();
                    cUPRP.STATUSFLAG = br.ReadUInt16();
                    cUPRP.UNUSED     = br.ReadUInt32();

                    UPRP[i] = cUPRP;
                }
                break;

            case TOKENTYPE.UPUS:
                UPUS = br.ReadBytes(64);
                break;

            case TOKENTYPE.WAV:
                WAV = new StringData[512];
                for (int i = 0; i < 512; i++)
                {
                    WAV[i] = new StringData(this, br.ReadInt32());
                }
                break;

            case TOKENTYPE.SWNM:
                SWNM = new StringData[256];
                for (int i = 0; i < 256; i++)
                {
                    SWNM[i] = new StringData(this, br.ReadInt32());
                }
                break;

            case TOKENTYPE.PUNI:
                PUNI = new CPUNI();
                for (int i = 0; i < 12; i++)
                {
                    PUNI.UNITENABLED[i] = br.ReadBytes(228);
                }
                PUNI.DEFAULT = br.ReadBytes(228);
                for (int i = 0; i < 12; i++)
                {
                    PUNI.USEDEFAULT[i] = br.ReadBytes(228);
                }

                break;

            case TOKENTYPE.PUPx:
                PUPx = new CPUPx();
                for (int i = 0; i < 12; i++)
                {
                    PUPx.MAXLEVEL[i] = br.ReadBytes(61);
                }
                for (int i = 0; i < 12; i++)
                {
                    PUPx.STARTLEVEL[i] = br.ReadBytes(61);
                }
                PUPx.DEFAULTMAXLEVEL   = br.ReadBytes(61);
                PUPx.DEFAULTSTARTLEVEL = br.ReadBytes(61);
                for (int i = 0; i < 12; i++)
                {
                    PUPx.USEDEFAULT[i] = br.ReadBytes(61);
                }

                break;

            case TOKENTYPE.PTEx:
                PTEx = new CPTEx();
                for (int i = 0; i < 12; i++)
                {
                    PTEx.MAXLEVEL[i] = br.ReadBytes(44);
                }
                for (int i = 0; i < 12; i++)
                {
                    PTEx.STARTLEVEL[i] = br.ReadBytes(44);
                }
                PTEx.DEFAULTMAXLEVEL   = br.ReadBytes(44);
                PTEx.DEFAULTSTARTLEVEL = br.ReadBytes(44);
                for (int i = 0; i < 12; i++)
                {
                    PTEx.USEDEFAULT[i] = br.ReadBytes(44);
                }

                break;

            case TOKENTYPE.UNIx:
                UNIx = new CUNIx();
                for (int i = 0; i < 228; i++)
                {
                    UNIx.USEDEFAULT[i] = br.ReadByte();
                }

                for (int i = 0; i < 228; i++)
                {
                    UNIx.HIT[i] = br.ReadUInt32();
                }
                for (int i = 0; i < 228; i++)
                {
                    UNIx.SHIELD[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 228; i++)
                {
                    UNIx.ARMOR[i] = br.ReadByte();
                }
                for (int i = 0; i < 228; i++)
                {
                    UNIx.BUILDTIME[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 228; i++)
                {
                    UNIx.MIN[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 228; i++)
                {
                    UNIx.GAS[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 228; i++)
                {
                    UNIx.STRING[i] = new StringData(this, br.ReadUInt16());
                }
                for (int i = 0; i < 130; i++)
                {
                    UNIx.DMG[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 130; i++)
                {
                    UNIx.BONUSDMG[i] = br.ReadUInt16();
                }

                break;

            case TOKENTYPE.UPGx:
                UPGx = new CUPGx();
                for (int i = 0; i < 61; i++)
                {
                    UPGx.USEDEFAULT[i] = br.ReadByte();
                }
                br.ReadByte();
                for (int i = 0; i < 61; i++)
                {
                    UPGx.BASEMIN[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 61; i++)
                {
                    UPGx.BONUSMIN[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 61; i++)
                {
                    UPGx.BASEGAS[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 61; i++)
                {
                    UPGx.BONUSGAS[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 61; i++)
                {
                    UPGx.BASETIME[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 61; i++)
                {
                    UPGx.BONUSTIME[i] = br.ReadUInt16();
                }

                break;

            case TOKENTYPE.TECx:
                TECx = new CTECx();
                for (int i = 0; i < 44; i++)
                {
                    TECx.USEDEFAULT[i] = br.ReadByte();
                }
                for (int i = 0; i < 44; i++)
                {
                    TECx.MIN[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 44; i++)
                {
                    TECx.GAS[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 44; i++)
                {
                    TECx.BASETIME[i] = br.ReadUInt16();
                }
                for (int i = 0; i < 44; i++)
                {
                    TECx.ENERGY[i] = br.ReadUInt16();
                }

                break;

            case TOKENTYPE.TRIG:
                TRIG.Clear();

                for (int i = 0; i < cHKToken.size / 2400; i++)
                {
                    RAWTRIGMBRF trig = new RAWTRIGMBRF(br);

                    TRIG.Add(trig);
                }


                break;

            case TOKENTYPE.MBRF:
                MBRF.Clear();

                for (int i = 0; i < cHKToken.size / 2400; i++)
                {
                    RAWTRIGMBRF mbrf = new RAWTRIGMBRF(br);

                    MBRF.Add(mbrf);
                }


                break;
            }



            for (int i = 0; i < cHKTokens.Count; i++)
            {
                if (cHKTokens[i].code == cHKToken.code)
                {
                    cHKTokens.RemoveAt(i);
                    break;
                }
            }
            cHKTokens.Add(cHKToken);
            br.BaseStream.Position = cHKToken.end;
            return(true);
        }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Request["zId"]))
            {
                // if (!string.IsNullOrEmpty(Request["zId"]) && !IsPostBack)
                Response.Redirect("~/About.aspx");
            }
            _wz = Int32.Parse(Request["zId"]);
            if (User.Identity.Name != "ODS14")
            {
                Treg.Visible = false; Tzak.Visible = false;
            }
            if (!IsPostBack)
            {
                App_Code.Base db   = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
                DataTable     data = db.GetEvent(_wz);
                if (data.Rows.Count < 1)
                {
                    Response.Redirect("~/About.aspx");
                }
                Id.Text     = _wz.ToString();
                Sourse.Text = data.Rows[0]["Sourse"].ToString();
                Text1.Text  = data.Rows[0]["Sourse"].ToString();
                IO.Text     = data.Rows[0]["IO"].ToString();
                DataId.Text = data.Rows[0]["DataId"].ToString();
                dateReg     = ((DateTime)data.Rows[0]["DataId"]);
                if (!string.IsNullOrEmpty(data.Rows[0]["DataId"].ToString()))
                {
                    yyy  = ((DateTime)data.Rows[0]["DataId"]).Year.ToString();
                    ddd  = ((DateTime)data.Rows[0]["DataId"]).Day.ToString();
                    momo = ((DateTime)data.Rows[0]["DataId"]).Month.ToString();
                    hhh  = ((DateTime)data.Rows[0]["DataId"]).Hour.ToString();
                    mmm  = ((DateTime)data.Rows[0]["DataId"]).Minute.ToString();
                }
                RegistrId.Text = data.Rows[0]["RegistrId"].ToString();
                LiftId.Text    = data.Rows[0]["LiftId"].ToString();
                TextBox4.Text  = data.Rows[0]["LiftId"].ToString();
                TypeId.Text    = data.Rows[0]["TypeId"].ToString();
                EventId.Text   = data.Rows[0]["EventId"].ToString();
                Text.Text      = data.Rows[0]["EventId"].ToString();
                ToApp.Text     = data.Rows[0]["ToApp"].ToString();
                Text2.Text     = data.Rows[0]["ToApp"].ToString();
                DateToApp.Text = data.Rows[0]["DateToApp"].ToString();
                if (!string.IsNullOrEmpty(data.Rows[0]["DateToApp"].ToString()))
                {
                    yyy1  = ((DateTime)data.Rows[0]["DateToApp"]).Year.ToString();
                    ddd1  = ((DateTime)data.Rows[0]["DateToApp"]).Day.ToString();
                    momo1 = ((DateTime)data.Rows[0]["DateToApp"]).Month.ToString();
                    hhh1  = ((DateTime)data.Rows[0]["DateToApp"]).Hour.ToString();
                    mmm1  = ((DateTime)data.Rows[0]["DateToApp"]).Minute.ToString();
                }
                Who.Text     = data.Rows[0]["Who"].ToString();
                Comment.Text = data.Rows[0]["Comment"].ToString();
                Text5.Text   = data.Rows[0]["Prim"].ToString();
                Prim.Text    = data.Rows[0]["Prim"].ToString();
                DateWho.Text = data.Rows[0]["DateWho"].ToString();
                //   TextBox3.Text = data.Rows[0]["DateWho"].ToString();
                //   if (string.IsNullOrEmpty(TextBox3.Text))
                //   TextBox3.Text = Convert.ToString(DateTime.Now);
                string   d = string.Empty;
                string   d2 = string.Empty, t2 = string.Empty;
                TimeSpan pr = DateTime.Now - ((DateTime)data.Rows[0]["DataId"]);
                if (!(data.Rows[0]["DateWho"] is DBNull))
                {
                    d2 = ((DateTime)data.Rows[0]["DateWho"]).Date.ToString();
                    t2 = ((DateTime)data.Rows[0]["DateWho"]).TimeOfDay.ToString();
                    pr = ((DateTime)data.Rows[0]["DateWho"]) - ((DateTime)data.Rows[0]["DataId"]);
                }
                if (!(data.Rows[0]["DateToApp"] is DBNull))
                {
                    d = ((DateTime)data.Rows[0]["DateToApp"]).ToString();
                }
                string prostoy = ((int)pr.TotalDays).ToString() + " " + pr.Hours.ToString() + ":" +
                                 pr.Minutes.ToString();
                Timing.Text = prostoy;
                {
                    yyy2  = DateTime.Now.Year.ToString();
                    ddd2  = DateTime.Now.Day.ToString();
                    momo2 = DateTime.Now.Month.ToString();
                    hhh2  = DateTime.Now.Hour.ToString();
                    mmm2  = DateTime.Now.Minute.ToString();
                }
            }
            //Год/месяц/день
            List <string> yy = new List <string>()
            {
                yyy, "2016", "2017", "2018", "2019", "2020"
            };

            if (!IsPostBack)
            {
                YY.DataSource = yy;
                YY.DataBind();
                YY.SelectedIndex = 0;
            }
            List <string> yy1 = new List <string>()
            {
                yyy1, "2016", "2017", "2018", "2019", "2020"
            };

            if (!IsPostBack)
            {
                YY1.DataSource = yy1;
                YY1.DataBind();
                YY1.SelectedIndex = 0;
            }
            List <string> yy2 = new List <string>()
            {
                yyy2, "2016", "2017", "2018", "2019", "2020"
            };

            if (!IsPostBack)
            {
                YY2.DataSource = yy2;
                YY2.DataBind();
                YY2.SelectedIndex = 0;
            }
            List <string> mo = new List <string>()
            {
                momo, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"
            };

            if (!IsPostBack)
            {
                MO.DataSource = mo;
                MO.DataBind();
                MO.SelectedIndex = 0;
            }
            List <string> mo1 = new List <string>()
            {
                momo1, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"
            };

            if (!IsPostBack)
            {
                MO1.DataSource = mo1;
                MO1.DataBind();
                MO1.SelectedIndex = 0;
            }
            List <string> mo2 = new List <string>()
            {
                momo2, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"
            };

            if (!IsPostBack)
            {
                MO2.DataSource = mo2;
                MO2.DataBind();
                MO2.SelectedIndex = 0;
            }
            List <string> dd = new List <string>()
            {
                ddd, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"
            };

            if (!IsPostBack)
            {
                DD.DataSource = dd;
                DD.DataBind();
                DD.SelectedIndex = 0;
            }
            List <string> dd1 = new List <string>()
            {
                ddd1, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"
            };

            if (!IsPostBack)
            {
                DD1.DataSource = dd1;
                DD1.DataBind();
                DD1.SelectedIndex = 0;
            }
            List <string> dd2 = new List <string>()
            {
                ddd2, "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"
            };

            if (!IsPostBack)
            {
                DD2.DataSource = dd2;
                DD2.DataBind();
                DD2.SelectedIndex = 0;
            }

            //Часы/минуты
            List <string> hh = new List <string>()
            {
                hhh, "0", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"
            };

            if (!IsPostBack)
            {
                HH.DataSource = hh;
                HH.DataBind();
                HH.SelectedIndex = 0;
            }
            List <string> hh1 = new List <string>()
            {
                hhh1, "0", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"
            };

            if (!IsPostBack)
            {
                HH1.DataSource = hh1;
                HH1.DataBind();
                HH1.SelectedIndex = 0;
            }
            List <string> hh2 = new List <string>()
            {
                hhh2, "0", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"
            };

            if (!IsPostBack)
            {
                HH2.DataSource = hh2;
                HH2.DataBind();
                HH2.SelectedIndex = 0;
            }
            List <string> mm = new List <string>()
            {
                mmm, "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "00"
            };

            if (!IsPostBack)
            {
                MM.DataSource = mm;
                MM.DataBind();
                MM.SelectedIndex = 0;
            }
            List <string> mm1 = new List <string>()
            {
                mmm1, "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "00"
            };

            if (!IsPostBack)
            {
                MM1.DataSource = mm1;
                MM1.DataBind();
                MM1.SelectedIndex = 0;
            }
            List <string> mm2 = new List <string>()
            {
                mmm2, "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "00"
            };

            if (!IsPostBack)
            {
                MM2.DataSource = mm2;
                MM2.DataBind();
                MM2.SelectedIndex = 0;
            }

            //Диспетчер
            using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()))
            {
                conn.Open();

                SqlCommand cmd = new SqlCommand("select p.surname, p.name, p.midlename from People p " +
                                                "where p.comments=@user and p.specialty=N'диспетчер'", conn);

                cmd.Parameters.AddWithValue("user", User.Identity.Name);

                List <string> iodisp = new List <string>()
                {
                    IO.Text
                };
                SqlDataReader dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    iodisp.Add(dr[0].ToString() + " " + dr[1].ToString() + " " + dr[2].ToString());
                }
                dr.Close();
                if (!IsPostBack)
                {
                    FIO.DataSource = iodisp;
                    FIO.DataBind();
                    FIO.SelectedIndex = 0;
                    Fdr.Visible       = false;
                    TextBox5.Text     = IO.Text;
                }
            }
            //Механик
            List <string> worker = new List <string>()
            {
                ToApp.Text
            };

            if (!IsPostBack)
            {
                Workers.DataSource  = worker;
                Workers0.DataSource = worker;
                Workers.DataBind();
                Workers0.DataBind();
                Workers.SelectedIndex  = 0;
                Workers0.SelectedIndex = 0;
                Worker_TextChanged(this, EventArgs.Empty);
            }

            if (RegistrId.Text == "Эксплуатация лифтов")
            {
                Wrk.Visible   = true;
                Wrk0.Visible  = true;
                Text2.Visible = false;
                Text3.Visible = false;
            }
            else
            {
                Wrk.Visible   = false;
                Wrk0.Visible  = false;
                Text2.Visible = true;
                Text3.Visible = true;
            }
        }
Ejemplo n.º 6
0
        public void MapDataReset()
        {
            cHKTokens = new List <CHKToken>();
            for (int i = 0; i < 8; i++)
            {
                CRGB[i] = new Microsoft.Xna.Framework.Color(0, 0, 0);

                CRGBIND[i] = (byte)CRGBINDTYPE.UseCOLRselection;
                COLR[i]    = (byte)i;
            }
            UNIT.Clear();


            FORCE        = new byte[8];
            FORCENAME    = new StringData[4];
            FORCENAME[0] = new StringData(this, "세력 1");
            FORCENAME[1] = new StringData(this, "세력 2");
            FORCENAME[2] = new StringData(this, "세력 3");
            FORCENAME[3] = new StringData(this, "세력 4");


            SIDE      = new byte[12];
            FORCEFLAG = new byte[4];
            WIDTH     = 0;
            HEIGHT    = 0;
            MASK      = null;
            MTXM      = null;
            TILE      = null;

            BYTESTR  = null;
            BYTESTRx = null;
            LOADSTR  = null;
            LOADSTRx = null;
            IOWN     = null;
            OWNR     = null;
            //LocationDatas.Add(new LocationData());


            SCEARIONAME = new StringData(this, "제목 없음");
            SCEARIODES  = new StringData(this, "시나리오 설명이 없습니다.");

            ENCODING = null;// System.Text.Encoding.


            DD2.Clear();
            THG2.Clear();


            DDDTHG2.Clear();
            LocationDatas.Clear();
            LocationDatas.Add(new LocationData(mapEditor));

            UPRP = new CUPRP[64];
            for (int i = 0; i < 64; i++)
            {
                UPRP[i] = new CUPRP();
            }


            UPUS = new byte[64];

            WAV = new StringData[512];
            for (int i = 0; i < 512; i++)
            {
                WAV[i] = new StringData(this);
            }
            SWNM = new StringData[256];
            for (int i = 0; i < 256; i++)
            {
                SWNM[i] = new StringData(this);
            }

            TRIG.Clear();
            MBRF.Clear();

            PUNI = new CPUNI(true);
            PUPx = new CPUPx(true);
            PTEx = new CPTEx(true);
            UNIx = new CUNIx(this, true);
            UPGx = new CUPGx(true);
            TECx = new CTECx(true);

            soundDatas = new List <SoundData>();

            Triggers.Clear();
            Brifings.Clear();
        }