Add() public method

public Add ( Object key, Object value ) : void
key Object
value Object
return void
コード例 #1
1
ファイル: BmInfoController.cs プロジェクト: pjjwpc/.netOA
 public ActionResult GetBmCodes(string codes)
 {
     Hashtable ht = new Hashtable();
     string[] str = codes.Split(',');
     foreach (var temp in str)
     {
         switch (temp)
         {
             case "xtzylx":
                 ht.Add(temp, UtilCodeInfo.xtzylx);
                 break;
             case "xtzyzt":
                 ht.Add(temp, UtilCodeInfo.xtzyzt);
                 break;
             case "usRole":
                 ht.Add(temp, UtilCodeInfo.usRole);
                 break;
             case "usstate":
                 ht.Add(temp, UtilCodeInfo.usstate);
                 break;
             case "rolestate":
               //  ht.Add(temp, UtilCodeInfo.rolestate);
                 break;
             case "recode":
                 //ht.Add(temp, UtilCodeInfo.recode);
                 break;
         }
     }
     return Json(ht, JsonRequestBehavior.AllowGet);
 }
コード例 #2
1
ファイル: BlLogin.cs プロジェクト: jibarradelgado/medicuri
 /// <summary>
 /// Carga una hashtable que contiene los permisos del usuario (menu desplegable)
 /// </summary>
 /// <returns></returns>
 public Hashtable CargarPermisos()
 {
     MedDAL.DAL.permisos_usuarios permisoUsuario;
     Hashtable htPermisos = new Hashtable();
     int count=1;
     char cPermiso;
     string[] listaPermisos = { "usuarios", "perfiles", 
                                "clientes", "vendedores", "proveedores", "estados", "municipios", "poblaciones", "colonias", 
                                "almacenes", "productos", "inventarios", 
                                "pedidos", "recetas", "remisiones", "facturas", 
                                "causes", "bitacora", 
                                "configuracion", "campos editables", "tipos", "cuentas x cobrar", 
                                "tipos de iva", "ensambles", "lineas de credito"};
        
     foreach (string permiso in listaPermisos) {
         permisoUsuario = (MedDAL.DAL.permisos_usuarios)blPermisosUsuarios.RecuperarPermisos(idUsuario, count);
         cPermiso = (permisoUsuario.TipoAcceso.ToString().ToCharArray())[0];
         if (cPermiso!='N')
             htPermisos.Add(permiso, cPermiso);
         count++;
     }
     permisoUsuario = (MedDAL.DAL.permisos_usuarios)blPermisosUsuarios.RecuperarPermisos(idUsuario, 16);
     cPermiso = (permisoUsuario.TipoAcceso.ToString().ToCharArray())[0];
     if (cPermiso != 'N')
         htPermisos.Add("facturas x receta", cPermiso);
     htPermisos.Add("reportes",'T');
     htPermisos.Add("cambiar contraseña", 'T');
     htPermisos.Add("movimientos", 'T');
     return htPermisos;
 }
コード例 #3
1
ファイル: ES_DataLayer.cs プロジェクト: eddylin2015/ES_TABLE
 /// <summary>
 /// 構造
 /// </summary>
 protected ESData()
 {
     dict = new Hashtable();
     dict.Add("itemno", "物品編號");
     dict.Add("item", "產品");
     dict.Add("model", "型號");
 }
コード例 #4
0
ファイル: WorkFlowChart.aspx.cs プロジェクト: zxl881203/src
    private void addFlowChart_top1()
    {
        int rowNum = 1;

        System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
        hashtable.Add("TemplateID", this.TemplateID.ToString());
        hashtable.Add("RowNum", rowNum.ToString());
        hashtable.Add("Column1", SqlStringConstructor.GetQuotedString("1;0;开始"));
        DataRow dataRow = FlowTemplateAction.QueryFlowChart_top1(this.TemplateID, rowNum);

        if (dataRow != null)
        {
            if ((dataRow["TemplateID"].ToString() == "" || dataRow["TemplateID"] == null) && !FlowTemplateAction.AddFlowChart(hashtable))
            {
                this.JS.Text = "alert('添加数据失败!')";
                return;
            }
        }
        else
        {
            if (!FlowTemplateAction.AddFlowChart(hashtable))
            {
                this.JS.Text = "alert('添加数据失败!')";
            }
        }
    }
コード例 #5
0
        private void ARPopulateComboWithMapLayers(ComboBox Layers, System.Collections.Hashtable LayersIndex)
        {
            //In case cboLayers is already populated
            Layers.Items.Clear();
            LayersIndex.Clear();

            ARLayer arLayer;
            ARLayer arGroupLayer;

            // Get the focus map
            ARMap arMap = axArcReaderControl1.ARPageLayout.FocusARMap;

            // Loop through each layer in the focus map
            for (int i = 0; i <= arMap.ARLayerCount - 1; i++)
            {
                // Get the layer name and add to combo
                arLayer = arMap.get_ARLayer(i);
                if (arLayer.IsGroupLayer == true)
                {
                    //If a GroupLayer add the ARChildLayers to the combo and HashTable
                    for (int g = 0; g <= arLayer.ARLayerCount - 1; g++)
                    {
                        arGroupLayer = arMap.get_ARLayer(i).get_ChildARLayer(g);
                        Layers.Items.Add(arGroupLayer.Name);
                        LayersIndex.Add(Layers.Items.Count - 1, arGroupLayer);
                    }
                }
                else if (arLayer.Searchable == true)
                {
                    Layers.Items.Add(arLayer.Name);
                    LayersIndex.Add(Layers.Items.Count - 1, arLayer);
                }
            }
        }
コード例 #6
0
        private void ddl_State_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddl_State.SelectedIndex > 0)
            {
                //dbc.BindCounty_Listbox(listBox1, int.Parse(ddl_State.SelectedValue.ToString()));

                Hashtable htcounty = new System.Collections.Hashtable();
                DataTable dtcounty = new DataTable();
                htcounty.Add("@Trans", "SELECT_STATE");
                htcounty.Add("@State", int.Parse(ddl_State.SelectedValue.ToString()));
                htcounty.Add("@Abstractor_Id", ABSTRACT_ID);
                dtcounty = dataaccess.ExecuteSP("Sp_Abstractor_Cost", htcounty);
                if (dtcounty.Rows.Count > 0)
                {
                    Grid_State.Rows.Clear();

                    for (int i = 0; i < dtcounty.Rows.Count; i++)
                    {
                        Grid_State.AutoGenerateColumns = false;
                        Grid_State.Rows.Add();
                        //Grid_State.Rows[i].Cells[0].Value = i + 1;
                        //grd_Services.Rows[i].Cells[0].Value = i + 1;
                        Grid_State.Rows[i].Cells[1].Value = dtcounty.Rows[i]["County"].ToString();

                        Grid_State.Rows[i].Cells[2].Value = dtcounty.Rows[i]["County_ID"].ToString();
                    }
                }
            }
            else
            {
                Grid_State.Rows.Clear();
            }
        }
コード例 #7
0
        public void Gridview_Bind_Abstractor_Cost_Tat()
        {
            Hashtable htselect = new System.Collections.Hashtable();
            DataTable dtselect = new DataTable();

            htselect.Add("@Trans", "SELECT_ABSTRACTOR_WISE");
            htselect.Add("@Abstractor_Id", ABSTRACT_ID);
            htselect.Add("@State", State);
            htselect.Add("@County", County);
            dtselect = dataaccess.ExecuteSP("Sp_Abstractor_Cost", htselect);
            if (dtselect.Rows.Count > 0)
            {
                grd_Services.Rows.Clear();

                for (int i = 0; i < dtselect.Rows.Count; i++)
                {
                    grd_Services.AutoGenerateColumns = false;
                    grd_Services.Rows.Add();
                    grd_Services.Rows[i].Cells[1].Value = i + 1;
                    //grd_Services.Rows[i].Cells[0].Value = i + 1;
                    grd_Services.Rows[i].Cells[2].Value = dtselect.Rows[i]["Order_Type"].ToString();
                    grd_Services.Rows[i].Cells[3].Value = dtselect.Rows[i]["Cost"].ToString();
                    grd_Services.Rows[i].Cells[4].Value = dtselect.Rows[i]["Tat"].ToString();
                    grd_Services.Rows[i].Cells[5].Value = dtselect.Rows[i]["Order_Type_Id"].ToString();
                }
            }
        }
コード例 #8
0
 public void Play()
 {
     System.Collections.Hashtable hash = new System.Collections.Hashtable();
     hash.Add("amount", new Vector3(0.4f, 0.4f, 0f));
     hash.Add("time", 1.5f);
     iTween.PunchScale(gameObject, hash);
 }
コード例 #9
0
ファイル: regExpr.cs プロジェクト: iAM9/Miscellaneous
        static void Main(string[] args)
        {
            Hashtable htable = new Hashtable();

            htable.Add("int[A-Za-z]+[A-Za-z0-9]+","integer declaration");
            htable.Add("int[A-Za-z]*[A-Za-z0-9]*[=][0-9]*", "integer initialization to numbers");
            htable.Add("def[A-Za-z][A-Za-z0-9]()", "function defintion start");
            htable.Add("[0-9]*[+][0-9]*[+][0-9]*", "add statement");
            htable.Add("puts[\"][A-Za-z]+[\"]", "print statement");

            List<string> token_table = new List<string>();
            while (true)
            {
                Console.WriteLine("Enter: ");
                string input = Console.ReadLine();

                    foreach (DictionaryEntry entry in htable)
                    {
                        if (Regex.IsMatch(input, (string)entry.Key))
                        {
                            Console.WriteLine(entry.Value);
                        }

                    }

            }
        }
コード例 #10
0
ファイル: FormDsicard.cs プロジェクト: nhnchengdu/nGit
        public FormDsicard(string szSolutionName, List<string> FileList, CGitManager objGitMgr)
        {
            InitializeComponent();
            _objGitMgr = objGitMgr;
            _szSolutionName = szSolutionName;
            _lstAllFiles = FileList;

            _hashAllFiles = new Hashtable();
            foreach (string szItem in FileList)
            {
                FileSccStatus status = _objGitMgr.GetFileStatus(szItem);
                if (status==FileSccStatus.ST_NEW_STAGED||status==FileSccStatus.ST_STAGE_MODIFIED)
                {
                    _hashAllFiles.Add(szItem,"Index");
                }
                else if(status==FileSccStatus.ST_CHECKIN_MODIFIED)
                {
                    _hashAllFiles.Add(szItem,"Repos");
                }
                else if (status==FileSccStatus.ST_MODIFY_STAGED_MODIFY||status==FileSccStatus.ST_MODIFY_STAGED)
                {
                    _hashAllFiles.Add(szItem, "Both");
                }
                else
                {
                    continue;
                }
            }
            if (_hashAllFiles.Count <= 0)
                bUsShortFileName = true;
        }
コード例 #11
0
 private static Hashtable CreateFunctionTable()
 {
     Hashtable hashtable = new Hashtable(0x24);
     hashtable.Add("last", new ParamInfo(Function.FunctionType.FuncLast, 0, 0, temparray1));
     hashtable.Add("position", new ParamInfo(Function.FunctionType.FuncPosition, 0, 0, temparray1));
     hashtable.Add("name", new ParamInfo(Function.FunctionType.FuncName, 0, 1, temparray2));
     hashtable.Add("namespace-uri", new ParamInfo(Function.FunctionType.FuncNameSpaceUri, 0, 1, temparray2));
     hashtable.Add("local-name", new ParamInfo(Function.FunctionType.FuncLocalName, 0, 1, temparray2));
     hashtable.Add("count", new ParamInfo(Function.FunctionType.FuncCount, 1, 1, temparray2));
     hashtable.Add("id", new ParamInfo(Function.FunctionType.FuncID, 1, 1, temparray3));
     hashtable.Add("string", new ParamInfo(Function.FunctionType.FuncString, 0, 1, temparray3));
     hashtable.Add("concat", new ParamInfo(Function.FunctionType.FuncConcat, 2, 100, temparray4));
     hashtable.Add("starts-with", new ParamInfo(Function.FunctionType.FuncStartsWith, 2, 2, temparray5));
     hashtable.Add("contains", new ParamInfo(Function.FunctionType.FuncContains, 2, 2, temparray5));
     hashtable.Add("substring-before", new ParamInfo(Function.FunctionType.FuncSubstringBefore, 2, 2, temparray5));
     hashtable.Add("substring-after", new ParamInfo(Function.FunctionType.FuncSubstringAfter, 2, 2, temparray5));
     hashtable.Add("substring", new ParamInfo(Function.FunctionType.FuncSubstring, 2, 3, temparray6));
     hashtable.Add("string-length", new ParamInfo(Function.FunctionType.FuncStringLength, 0, 1, temparray4));
     hashtable.Add("normalize-space", new ParamInfo(Function.FunctionType.FuncNormalize, 0, 1, temparray4));
     hashtable.Add("translate", new ParamInfo(Function.FunctionType.FuncTranslate, 3, 3, temparray7));
     hashtable.Add("boolean", new ParamInfo(Function.FunctionType.FuncBoolean, 1, 1, temparray3));
     hashtable.Add("not", new ParamInfo(Function.FunctionType.FuncNot, 1, 1, temparray8));
     hashtable.Add("true", new ParamInfo(Function.FunctionType.FuncTrue, 0, 0, temparray8));
     hashtable.Add("false", new ParamInfo(Function.FunctionType.FuncFalse, 0, 0, temparray8));
     hashtable.Add("lang", new ParamInfo(Function.FunctionType.FuncLang, 1, 1, temparray4));
     hashtable.Add("number", new ParamInfo(Function.FunctionType.FuncNumber, 0, 1, temparray3));
     hashtable.Add("sum", new ParamInfo(Function.FunctionType.FuncSum, 1, 1, temparray2));
     hashtable.Add("floor", new ParamInfo(Function.FunctionType.FuncFloor, 1, 1, temparray9));
     hashtable.Add("ceiling", new ParamInfo(Function.FunctionType.FuncCeiling, 1, 1, temparray9));
     hashtable.Add("round", new ParamInfo(Function.FunctionType.FuncRound, 1, 1, temparray9));
     return hashtable;
 }
コード例 #12
0
        internal PermissionToken FindToken(Type cls)
        {
            IntPtr typePtr = cls.TypeHandle.Value;

            PermissionToken tok = (PermissionToken)m_handleTable[typePtr];

            if (tok != null)
            {
                return(tok);
            }

            if (m_tokenTable == null)
            {
                return(null);
            }

            tok = (PermissionToken)m_tokenTable[cls.AssemblyQualifiedName];

            if (tok != null)
            {
                lock (this)
                {
                    m_handleTable.Add(typePtr, tok);
                }
            }

            return(tok);
        }
コード例 #13
0
ファイル: RestHTTPHandler.cs プロジェクト: Gnu32/Silverfin
 public override Hashtable Handle(string path, Hashtable request)
 {
     string param = GetParam(path);
     request.Add("param", param);
     request.Add("path", path);
     return m_dhttpMethod(request);
 }
コード例 #14
0
        private void resimleriKaristir()
        {
            tokenstate.Clear();
            // hamle sifirlanir - baslangic
            hamle       = 0;
            label2.Text = hamle.ToString();
            // hamle siniflanir - bitis
            this.panel1.Controls.Clear(); // paneldeki tüm elemanlar silinir.
            int       left = 0;
            int       top  = 0;
            Random    rnd  = new Random();
            ArrayList gen  = new ArrayList(zorluk * zorluk);

            for (int i = 0; i < zorluk * zorluk; i++)
            {
                int yeniResimIndis = rnd.Next(0, zorluk * zorluk);
                while (gen.Contains(yeniResimIndis))
                {
                    yeniResimIndis = rnd.Next(0, zorluk * zorluk);
                }
                PictureBox pic = (PictureBox)pboxlar[yeniResimIndis];
                pic.Location = new Point(left, top);
                this.panel1.Controls.Add(pic);
                tokenstate.Add(pic.Tag, i);
                gen.Add(yeniResimIndis);
                left += en / zorluk;
                if ((i + 1) % zorluk == 0)
                {
                    left = 0;
                    top += boy / zorluk;
                }
            }
        }
コード例 #15
0
        private void PopulateComboWithMapLayers(ComboBox Layers, bool bLayer, System.Collections.Hashtable LayersIndex)
        {
            Layers.Items.Clear();
            LayersIndex.Clear();

            ILayer       aLayer;
            AxMapControl axMap = pMainFrm.getMapControl();

            for (int i = 0; i <= axMap.LayerCount - 1; i++)
            {
                // Get the layer name and add to combo
                aLayer = axMap.get_Layer(i);
                if (aLayer.Valid == true)
                {
                    if (bLayer == true)
                    {
                        if (aLayer is IFeatureLayer)
                        {
                            Layers.Items.Add(aLayer.Name);
                            LayersIndex.Add(Layers.Items.Count - 1, aLayer);
                        }
                    }
                    else
                    {
                        if (aLayer is IRasterLayer)
                        {
                            Layers.Items.Add(aLayer.Name);
                            LayersIndex.Add(Layers.Items.Count - 1, aLayer);
                        }
                    }
                }
            }
        }
コード例 #16
0
        private void Delete(WebSocketClient client)
        {
            this.receiveCounter = 0;
            this.stopwatch.Reset();

            for (int i = 0; i < SIZE; i++)
            {
                var table = new System.Collections.Hashtable();
                table.Add("action", "delete");
                table.Add("queue", "/test/text/1");
                table.Add("requestid", i.ToString());

                var json = Adf.JsonHelper.Serialize(table);

                client.SendAsync(json, null);
                //client.Send(json);
            }

            //client.Send(END);
            //client.SendAsync(END, null);

            Console.WriteLine("send {0} delete completed, seconds:{1}, {2} loop/s"
                              , SIZE
                              , (double)(stopwatch.ElapsedMilliseconds / 1000)
                              , SIZE / (double)(stopwatch.ElapsedMilliseconds / 1000)
                              );
        }
コード例 #17
0
 public void ExportFlat()
 {
     Hashtable h = new Hashtable();
  
     h.Add("FirstName", "John");
     h.Add("LastName", "Doe");
     h.Add("MiddleName", null);
     
     JsonReader reader = Export(h);
     
     //
     // We need a complex assertions loop here because the order in 
     // which members are written cannot be guaranteed to follow
     // the order of insertion.
     //
     
     reader.ReadToken(JsonTokenClass.Object);
     while (reader.TokenClass != JsonTokenClass.EndObject)
     {
         string member = reader.ReadMember();
         Assert.IsTrue(h.Contains(member));
     
         object expected = h[member];
         
         if (expected == null)
             reader.ReadNull();
         else
             Assert.AreEqual(expected, reader.ReadString());
     }
 }
コード例 #18
0
ファイル: AccessDB.cs プロジェクト: vincemo/OMS
        //public SqlConnection getSqlConnection()
        //{
        //    string myConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\Project\\OSM\\OSM\\DB\\OSMDBProvider.accdb;Persist Security Info=True";
        //    //"server=127.0.0.1;uid=user;pwd=123456;database=Northwind;Trusted_Connection=no";
        //    SqlConnection sqlConnection = new SqlConnection(myConn);
        //    return sqlConnection;
        //}

        /// <summary>
        /// 系统登陆数据库接口
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        public Hashtable login(string sql)
        {
            OleDbConnection conn = getConnection();
            try
            {
                OleDbCommand command = new OleDbCommand(sql, conn);
                conn.Open();
                OleDbDataReader reader = command.ExecuteReader();
                
                if (reader.Read())
                {
                    string id = reader["ID"].ToString();
                    string username = reader["USER_NAME"].ToString();
                    string userid = reader["USER_ID"].ToString();
                    string pwd = reader["USER_PWD"].ToString();

                    Hashtable ht = new Hashtable();
                    ht.Add("id", id);
                    ht.Add("userid", userid);
                    ht.Add("username", username);
                    conn.Close();
                    conn.Dispose();
                    return ht;
                }
                else
                {
                    return null;
                    //throw (new Exception("当前数据表没有记录!"));
                }
            }
            catch (Exception e)
            {
                throw (new Exception("数据库连接出错!" + e.Message));
            }
        }
コード例 #19
0
ファイル: Program.cs プロジェクト: payam49er/experiments
            public char FindNonRepeated(string word)
            {
                Hashtable chartable = new Hashtable();

                char c;
                //building the hashtable
                for (int i = 0; i < word.Length; i++)
                {
                    c = word[i];
                    if (chartable.ContainsKey(c))
                    {
                        //increment count corresponding to the c
                        chartable.Add(c,(int)chartable[c] + 1);
                    }
                        else
                        {
                            chartable.Add(c,1);
                        }
                }
                //search hash table
                for(int i = 0; i < word.Length ; i++)
                {
                    char item ;
                    item = word[i];
                    if((int)chartable[item] == 1)
                    {
                        this.c= item;
                    }
                }

                   return this.c;
            }
コード例 #20
0
       public Hashtable GetSiteDetails()
       {
           Hashtable _SiteDetails = new Hashtable();
           try
           {
               Logger.Debug("Refreshing Site details:GetSiteDetails");
               ISingleResult<rsp_EventTransmitter_GetSiteDetailsResult> ResultSet = _ExchangeContext.rsp_EventTransmitter_GetSiteDetails();
              
               foreach (rsp_EventTransmitter_GetSiteDetailsResult oInst in ResultSet)
               {
                   _SiteDetails.Add("Area", oInst.sub_company_area_name);
                   _SiteDetails.Add("Company", oInst.Company_name);
                   _SiteDetails.Add("District", oInst.sub_company_District_Name);
                   _SiteDetails.Add("Region", oInst.Sub_Company_Region_Name);
                   _SiteDetails.Add("Sub_Company", oInst.sub_company_Name);
               }

           }
           catch (Exception Ex)
           {
               Logger.Error("DataAdapter", "GetSiteDetails()", Ex);
               _SiteDetails.Clear();
               _SiteDetails.Add("Area", string.Empty);
               _SiteDetails.Add("Company", string.Empty);
               _SiteDetails.Add("District", string.Empty);
               _SiteDetails.Add("Region", string.Empty);
               _SiteDetails.Add("Sub_Company", string.Empty);
           }
           return _SiteDetails;
       }
コード例 #21
0
 internal Hashtable ToHashtable()
 {
     Hashtable hashtable = new Hashtable();
     if (!this.Enabled)
     {
         hashtable.Add("enabled", false);
     }
     if (!string.IsNullOrEmpty(this.FillCollor))
     {
         hashtable.Add("fillColor", this.FillCollor);
     }
     if (this.LineColor != "#FFFFFF")
     {
         hashtable.Add("lineColor", this.LineColor);
     }
     if (this.LineWidth != 0)
     {
         hashtable.Add("lineWidth", this.LineWidth);
     }
     if (this.Radius != 0)
     {
         hashtable.Add("radius", this.Radius);
     }
     if (!string.IsNullOrEmpty(this.Symbol))
     {
         hashtable.Add("symbol", this.Symbol);
     }
     return hashtable;
 }
コード例 #22
0
ファイル: Connect.aspx.cs プロジェクト: eseawind/sac-pt
        /// 修改:李东峰 日期:2014-2-28
        /// 修改内容:增加根据visible属性判断是否显示该菜单
        public void GetLeftTree(string id)
        {
            string userId = Request.Cookies["T_USERID"].Value.ToString();
            string roleId = bl.GetRoleId(userId);
            dt = new DataTable();
            GetTreeList();
            DataRow[] _dr = dt.Select("PID='" + id + "'");

            IList<Hashtable> list = new List<Hashtable>();
            for (int i = 0; i < _dr.Length; i++)
            {
                string[] nodeRoleId = _dr[i][5].ToString().TrimStart(',').TrimEnd(',').Split(',');
                if (nodeRoleId.Contains(roleId) && _dr[i][4].ToString() == "1")
                {
                    Hashtable ht = new Hashtable();
                    ht.Add("ID", _dr[i][0].ToString());
                    ht.Add("NAME", _dr[i][1].ToString());
                    DataRow[] _dr_judge = dt.Select("PID='" + _dr[i][0].ToString() + "'");
                    if (_dr_judge.Length > 0)
                        ht.Add("JUDGE", "1");
                    else
                        ht.Add("JUDGE", "0");
                    list.Add(ht);
                }
            }

            object obj = new
            {
                list = list
            };

            string result = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
            Response.Write(result);
            Response.End();
        }
コード例 #23
0
 private void grd_Services_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         if (e.ColumnIndex == 1)
         {
             Ordermanagement_01.Abstractor.Abstractor_Entry abstractor = new Ordermanagement_01.Abstractor.Abstractor_Entry(grd_Services.Rows[e.RowIndex].Cells[1].Value.ToString(), grd_Services.Rows[e.RowIndex].Cells[9].Value.ToString(), "Update", userid);
             abstractor.Show();
         }
         else if (e.ColumnIndex == 10)
         {
             Ordermanagement_01.Abstractor.Abstractor_State_County_Details abstractor = new Ordermanagement_01.Abstractor.Abstractor_State_County_Details(grd_Services.Rows[e.RowIndex].Cells[1].Value.ToString(), grd_Services.Rows[e.RowIndex].Cells[9].Value.ToString(), userid);
             abstractor.Show();
         }
         else if (e.ColumnIndex == 12)
         {
             dialogResult = MessageBox.Show("Do you Want to Delete?", "Some Title", MessageBoxButtons.YesNo);
             if (dialogResult == DialogResult.Yes)
             {
                 Hashtable htselect = new System.Collections.Hashtable();
                 DataTable dtselect = new DataTable();
                 htselect.Add("@Trans", "DELETE");
                 htselect.Add("@Abstractor_Id", grd_Services.Rows[e.RowIndex].Cells[9].Value.ToString());
                 dtselect = dataaccess.ExecuteSP("Sp_Abstractor_Detail", htselect);
                 Gridview_Bind_Abstractor_Details();
             }
             else if (dialogResult == DialogResult.No)
             {
                 //do something else
             }
         }
     }
 }
コード例 #24
0
ファイル: Main.cs プロジェクト: smartfile/client-csharp
        public static int Main(string[] args)
        {
            /*
             * We expect command line arguments such as:
             * SmartFileTest.exe <method> <endpoint> [ <id> <name>=<value> ]
            */
            if (args.Length < 3)
            {
                Console.WriteLine("You must provide an HTTP method and endpoint.");
                return 1;
            }

            String method = args[0];
            String endpoint = args[1];

            BasicClient api = new BasicClient();

            /* SmartFileTest.exe POST path/data file0= */
            if (method == "POST" && endpoint == "path/data")
            {
                Hashtable p = new Hashtable();
                for (int i = 2; i < args.Length; i++)
                {
                    String argPair = args[i];
                    String[] parts = argPair.Split('=');
                    if (File.Exists(parts[1]))
                        p.Add(parts[0], new FileInfo(parts[1]));
                    else
                        p.Add(parts[0], parts[1]);
                }
                HttpWebResponse r = api.Post("path/data", null, p);
            }

            return 0;
        }
コード例 #25
0
ファイル: XmlCompent.cs プロジェクト: CSharpDev/Dev.All
 protected static Hashtable GetChildTable(XmlNode xn) //已知道有子接点
 {
     var ht = new Hashtable();
     foreach (XmlNode nxn in xn.ChildNodes)
     {
         if (nxn.ChildNodes.Count <= 0)
         {
             ht.Add(nxn.Name, nxn.InnerText);
         }
         else if (nxn.ChildNodes.Count == 1)
         {
             XmlNode nxn1 = nxn.ChildNodes[0];
             if (nxn1.NodeType == XmlNodeType.CDATA)
             {
                 ht.Add(nxn.Name, nxn.InnerText);
             }
             else
             {
                 ht.Add(nxn.Name, GetChildTable(nxn));
             }
         }
         else
         {
             ht.Add(nxn.Name, GetChildTable(nxn));
         }
     }
     return ht;
 }
コード例 #26
0
ファイル: XmlCompent.cs プロジェクト: CSharpDev/Dev.All
        /// <summary>
        /// 字符串格式XML转换成HASHTABLE
        /// </summary>
        /// <param name="XmlFile"></param>
        /// <returns></returns>
        public static Hashtable GetTable(string XmlFile)
        {
            var ht = new Hashtable();
            var XMLDom = new XmlDocument();
            XMLDom.LoadXml(XmlFile);
            XmlNode newXMLNode = XMLDom.SelectSingleNode("root");
            foreach (XmlNode xn in newXMLNode.ChildNodes)
            {
                if (xn.ChildNodes.Count <= 0)
                {
                    ht.Add(xn.Name, xn.InnerText);
                }
                else if (xn.ChildNodes.Count == 1) //这里主要是判断子接点中是否是<![CDATA[0]]>情形
                {
                    XmlNode nxn = xn.ChildNodes[0];
                    if (nxn.NodeType == XmlNodeType.CDATA)
                    {
                        ht.Add(xn.Name, xn.InnerText);
                    }
                    else
                    {
                        ht.Add(xn.Name, GetChildTable(xn));
                    }
                }
                else
                {
                    ht.Add(xn.Name, GetChildTable(xn));
                }
            }

            return ht;
        }
コード例 #27
0
ファイル: PurchaseManager.cs プロジェクト: ue96/ue96
        public void Abandon(int masterSysNo, int userSysNo)
        {
            TransactionOptions options = new TransactionOptions();
            options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
            options.Timeout = TransactionManager.DefaultTimeout;

            using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options))
            {

                //�����dz�ʼ״̬
                POInfo dbInfo = LoadPO(masterSysNo);
                if ( dbInfo == null )
                    throw new BizException("does not exist this po sysno");
                if ( dbInfo.Status != (int)AppEnum.POStatus.Origin )
                    throw new BizException("status is not origin now, abandon failed");

                //���� ���š�״̬�������
                Hashtable ht = new Hashtable(4);

                ht.Add("SysNo", masterSysNo);
                ht.Add("Status", (int)AppEnum.POStatus.Abandon);
                if ( 1!=new PODac().UpdateMaster(ht))
                    throw new BizException("expected one-row update failed, verify failed ");

                ProductIDManager.GetInstance().AbandonProductIDsByPO(masterSysNo);

                scope.Complete();
            }
        }
コード例 #28
0
    private IEnumerator shiftLvlUpBackgroundColors()
    {
        System.Collections.Hashtable hash = new System.Collections.Hashtable();
        hash.Add("amount", new Vector3(.35f, .35f, 0f));
        hash.Add("time", 1f);
        iTween.PunchScale(GameObject.Find("lvlOutline"), hash);

        //Color currentColor = lvlUpPanel.GetComponent<Image>().color;

        //Color color1 = new Color32(0x75, 0x9A, 0x8F, 0xFF);
        //Color color2 = new Color32(0x9F, 0xC1, 0xB7, 0xFF);
        //Color color3 = new Color32(0xD1, 0xE7, 0xE1, 0xFF);
        //Color color4 = new Color32(0x9F, 0xC1, 0xB7, 0xFF);

        //if (currentColor.Equals(color1)) {
        //  lvlUpPanel.GetComponent<Image>().color = color2;
        //} else if (currentColor.Equals(color2)) {
        //  lvlUpPanel.GetComponent<Image>().color = color3;
        //} else if (currentColor.Equals(color3)) {
        //  lvlUpPanel.GetComponent<Image>().color = color4;
        //} else {
        //  lvlUpPanel.GetComponent<Image>().color = color1;
        //}

        yield return(new WaitForSeconds(2f));

        backgroundShift = shiftLvlUpBackgroundColors();
        StartCoroutine(backgroundShift);
    }
コード例 #29
0
ファイル: SortedListTest.cs プロジェクト: ItsVeryWindy/mono
		public void TestConstructor3 ()
		{
			Hashtable d = new Hashtable ();
			d.Add ("one", "Mircosoft");
			d.Add ("two", "will");
			d.Add ("three", "rule");
			d.Add ("four", "the world");

			SortedList temp1 = new SortedList (d);
			Assert.IsNotNull (temp1, "#A1");
			Assert.AreEqual (4, temp1.Capacity, "#A2");
			Assert.AreEqual (4, temp1.Count, "#A3");

			try {
				new SortedList ((Hashtable) null);
				Assert.Fail ("#B");
			} catch (ArgumentNullException) {
			}

			try {
				d = new Hashtable ();
				d.Add ("one", "Mircosoft");
				d.Add ("two", "will");
				d.Add ("three", "rule");
				d.Add ("four", "the world");
				d.Add (7987, "lkj");
				new SortedList (d);
				Assert.Fail ("#C");
			} catch (InvalidOperationException) {
			}
		}
コード例 #30
0
        /// <summary>
        /// Begins the processing.
        /// </summary>
        protected override void BeginProcessing()
        {
            try
            {
                // Create an instance of the registry object
                RegistryKey subKey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\services\\CloudInit\\Settings", RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.ReadKey);

                Hashtable settings = new Hashtable();

                // Add the version to the settings list
                settings.Add("Version", Assembly.GetExecutingAssembly().GetName().Version);

                // Write all the settings in the settings folder
                foreach (String name in subKey.GetValueNames())
                {
                    settings.Add(name, subKey.GetValue(name));
                }

                WriteObject(settings);
            }
            catch (Exception ex)
            {
                WriteError(new ErrorRecord(ex, String.Empty, ErrorCategory.InvalidOperation, this));
            }
        }
コード例 #31
0
        public void SetRequired(Control ctl, bool val)
        {
            if (CustomProps.Contains(ctl))
            {
                Props p = (Props)CustomProps[ctl];
                if (val == p.Required)
                {
                    return;
                }

                p.Required       = val;
                CustomProps[ctl] = p;
                SetToolTip(ctl);
                if (val)
                {
                    ctl.Validating += new CancelEventHandler(ValidateProp);
                }
                else
                {
                    ctl.Validating -= new CancelEventHandler(ValidateProp);
                }
            }
            else
            {
                Props p = new Props();
                p.Required = val;

                CustomProps.Add(ctl, p);
                SetToolTip(ctl);
                ctl.Validating += new CancelEventHandler(ValidateProp);
            }
        }
コード例 #32
0
ファイル: M_FavoriteBLL.cs プロジェクト: qiuliang/tumumi
 /// <summary>
 /// 获取某用户某分类下收藏的文档总数
 /// </summary>
 /// <returns></returns>
 public int GetCataDocCount(int userId, int cataId)
 {
     Hashtable p = new Hashtable();
     p.Add("UserId", userId);
     p.Add("FavCateId", cataId);
     return GetCount(p);
 }
コード例 #33
0
ファイル: dbrEdit.aspx.cs プロジェクト: zxl881203/src
 protected void BtnAdd_Click(object sender, System.EventArgs e)
 {
     System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
     hashtable.Add("TemplateID", this.TemplateID.ToString());
     hashtable.Add("MainUser", SqlStringConstructor.GetQuotedString(this.UserCode.ToString()));
     hashtable.Add("SecondUser", SqlStringConstructor.GetQuotedString(this.hdnDbr.Value));
     hashtable.Add("TempNodeId", this.TempNodeID.ToString());
     if (this.NodeID == 0)
     {
         if (FlowTemplateAction.AddAgent(hashtable))
         {
             base.RegisterScript("top.ui.tabSuccess({ parentName: '_dbrinfo'});");
             return;
         }
         base.RegisterScript("top.ui.alert('保存失败');");
         return;
     }
     else
     {
         string where = " where NodeId = '" + this.NodeID + " '";
         if (FlowTemplateAction.UpdAgent(hashtable, where))
         {
             base.RegisterScript("top.ui.tabSuccess({ parentName: '_dbrinfo'});");
             return;
         }
         base.RegisterScript("top.ui.alert('保存失败');");
         return;
     }
 }
コード例 #34
0
ファイル: QRCodeHelper.cs プロジェクト: radtek/TaoLa
        public static System.Drawing.Bitmap Create(string content, System.Drawing.Image centralImage)
        {
            MultiFormatWriter multiFormatWriter = new MultiFormatWriter();

            System.Collections.Hashtable hashtable = new System.Collections.Hashtable();
            hashtable.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
            hashtable.Add(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
            ByteMatrix byteMatrix = multiFormatWriter.encode(content, BarcodeFormat.QR_CODE, 300, 300, hashtable);

            System.Drawing.Bitmap bitmap     = byteMatrix.ToBitmap();
            System.Drawing.Size   encodeSize = multiFormatWriter.GetEncodeSize(content, BarcodeFormat.QR_CODE, 300, 300);
            int num  = System.Math.Min((int)((double)encodeSize.Width / 3.5), centralImage.Width);
            int num2 = System.Math.Min((int)((double)encodeSize.Height / 3.5), centralImage.Height);
            int x    = (bitmap.Width - num) / 2;
            int y    = (bitmap.Height - num2) / 2;

            System.Drawing.Bitmap bitmap2 = new System.Drawing.Bitmap(bitmap.Width, bitmap.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
            using (System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap2))
            {
                graphics.InterpolationMode  = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                graphics.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
                graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
                graphics.DrawImage(bitmap, 0, 0);
            }
            System.Drawing.Graphics graphics2 = System.Drawing.Graphics.FromImage(bitmap2);
            graphics2.FillRectangle(System.Drawing.Brushes.White, x, y, num, num2);
            graphics2.DrawImage(centralImage, x, y, num, num2);
            return(bitmap2);
        }
コード例 #35
0
        public FormMain()
        {
            //
            // Required for Win Form Designer support
            //
            InitializeComponent();
            originalDir = Environment.CurrentDirectory;
            SetupFileDialog();

            //initialize the array of effect entries
            htEffects = new Hashtable();

            htEffects.Add(Effect.CodeGenPathField,
                "The Code Generation Path field determines the location in which your file is saved, once you click the 'Generate' button. If left empty, the file is saved in the current location (if not specified, this field will be automaticaly filled when all critical fields are completed).");
            htEffects.Add(Effect.FileNameField,
                "The Filename field determines the name of the file that is created, once the 'Generate' button is clicked. Note that an extension is automatically added to the name type in this box, based on the language selected from the language group below. Note, this name does not impact the name of the collection itself");
            htEffects.Add(Effect.CollectionTypeField,
                "The Type field determines the Type stored in your collection. The collection itself is named by concatenating the text in this field plus the word 'Collection'. The Type name specified here is also used throughout the source code generated");
            htEffects.Add(Effect.CollectionTypeNamespaceField,
                "The Type's Namespace (package in JScript) field indicates the Namespace in which the Type is declared. It's effect on the generated code is to include a 'using' (C#), 'Imports' (Visual Basic), or 'import' (JScript) statement near the top of the generated code");
            htEffects.Add(Effect.AuthorNameField,
                "The Author's Name field specifies the name of the person responsible for the created file.");
            htEffects.Add(Effect.CollectionNamespaceField,
                "The Collection's Namespace field indicates the Namespace (package in JScript) in which your collection is itself defined. It's effect on the generated code is to determine the Namespace declared for your collection, near the top of the code, as well as the namespace references included in the comments");
            htEffects.Add(Effect.LanguageField,
                "Using the language radio buttons, you can change the language in which the source code is generated. You can change this at any time");
            htEffects.Add(Effect.NestedEnumField,
                "Selecting the Nested Enumerator checkbox means that the Enumerator included with your collection is nested within the collection itself, rather than have it declared outside your collection. The enumerator is declared at the bottom of the generated code, and is named base on the specified Type");
            htEffects.Add(Effect.ValidationField,
                "Selecting the Add Validation checkbox means that Validation methods are added into the generated source code (they are added near the bottom of the code, but above the Enumerator declaration). Note that the validation methods are empty once added, but you can easily add your own validation code");
            htEffects.Add(Effect.DisposeField,
                "Selecting the Add Dispose checkbox means that the IDisposable interface and a Dispose() method are added into the generated code. The Dispose() method calls Dispose() for all items in the collection.");
            this.MinimumSize = new Size(640,480);
        }
コード例 #36
0
ファイル: AverageHoldingMapper.cs プロジェクト: kiquenet/B4F
        public static IList GetAverageHoldings(IDalSession session, IAccountTypeInternal account, DateTime startDate, DateTime endDate, ValuationTypesFilterOptions filterOption)
        {
            Hashtable parameters = new Hashtable(1);
            parameters.Add("account", account);
            parameters.Add("startDate", startDate);
            parameters.Add("endDate", endDate);
            string instrumentFilter = "";

            switch (filterOption)
            {
                case ValuationTypesFilterOptions.Security:
                    instrumentFilter = "and I.Key in (select S.Key from TradeableInstrument S) ";
                    break;
                case ValuationTypesFilterOptions.Monetary:
                    instrumentFilter = "and I.Key in (select C.Key from Currency C) ";
                    break;
            }

            string hql = string.Format(@"from AverageHolding A
                left join fetch A.Instrument I
                where A.Account = :account
                and (A.BeginDate between :startDate
                and :endDate ) {0}
                order by I.Key, A.BeginDate", instrumentFilter);
            return session.GetListByHQL(hql, parameters);
        }
コード例 #37
0
        //Start serial connection
        public void start()
        {
            //Check URL valid
            if (serverURL != "")
            {
                try
                {
                    Uri configuri = new Uri(serverURL);
                }
                catch (UriFormatException ex)
                {
                    statusLogAdd("Server URL Error: " + ex.Message);
                    return;
                }
            }

            //Clear status log box
            txtStatusLog.Clear();

            //Set button status to disconnect
            btnConnect.Text = "�Ͽ�����";

            //Pass through serial port to background worker
            Hashtable workerOptions = new Hashtable();
            workerOptions.Add("port", comPort);
            workerOptions.Add("serverURL", serverURL);
            workerOptions.Add("apiKey", apiKey);
            workerOptions.Add("data", "");
            workerOptions.Add("bdRate", bdRate);

            //Init background worker
            bgWorker.RunWorkerAsync(workerOptions);
        }
コード例 #38
0
        private void updateNode(TreeNode tn)
        {
            RenderableObjectInfo roi = (RenderableObjectInfo)tn.Tag;

            roi.LastSpotted = System.DateTime.Now;
            if (tn.Checked != roi.Renderable.IsOn)
            {
                tn.Checked = roi.Renderable.IsOn;
                //treeView1.BeginInvoke(new UpdateCheckStateNodeDelegate(this.UpdateCheckStateNode), new object[] {tn, roi.Renderable.IsOn});
            }

            if (roi.Renderable is WorldWind.Renderable.RenderableObjectList)
            {
                WorldWind.Renderable.RenderableObjectList rol = (WorldWind.Renderable.RenderableObjectList)roi.Renderable;
                for (int i = 0; i < rol.Count; i++)
                {
                    WorldWind.Renderable.RenderableObject childRo = (WorldWind.Renderable.RenderableObject)rol.ChildObjects[i];
                    string absolutePath = GetAbsoluteRenderableObjectPath(childRo);

                    TreeNode correctNode = (TreeNode)m_NodeHash[absolutePath];
                    if (correctNode == null)
                    {
                        correctNode = new TreeNode(childRo.Name);
                        RenderableObjectInfo curRoi = new RenderableObjectInfo();
                        curRoi.Renderable = childRo;
                        correctNode.Tag   = curRoi;

                        m_NodeHash.Add(absolutePath, correctNode);
                        treeView1.BeginInvoke(new UpdateChildNodeDelegate(this.UpdateChildNodeTree), new object[] { tn, correctNode });
                    }

                    updateNode(correctNode);
                }
            }
        }
コード例 #39
0
 private static Hashtable MakeMap(int thePlus, string theAmpersand)
 {
     Hashtable result = new Hashtable();
     result.Add("+", thePlus);
     result.Add("&", theAmpersand);
     return result;
 }
コード例 #40
0
		void close() {
			iTween.Stop (this.gameObject);
			Hashtable ht = new Hashtable ();
			ht.Add("scale", new Vector3(initialScale.x, closeScaleY, initialScale.x));
			ht.Add("time", speedTalk);
			iTween.ScaleTo(this.gameObject, ht);
		}
コード例 #41
0
 public static Hashtable getdisplayTextMap()
 {
     Hashtable displayText = new Hashtable();
     displayText.Add("LotNumber", "Lot Number");
     displayText.Add("BlockNumber", "Block");
     return displayText;
 }
コード例 #42
0
ファイル: IpcServerChannel.cs プロジェクト: Profit0004/mono
 /// <summary>
 /// Builds the default channel properties
 /// </summary>
 /// <param name="portName">The pipe name.</param>
 /// <returns></returns>
 internal static IDictionary BuildDefaultProperties(string name, string portName)
 {
     Hashtable h = new Hashtable();
     h.Add("name", name);
     h.Add("portName", portName);
     return h;
 }
コード例 #43
0
 public JsonRpcProxyGenerator(MessageBroker messageBroker)
     : base(messageBroker)
 {
     _generators = new Hashtable();
     _generators.Add("default", new DefaultJsonRpcProxyGenerator());
     try
     {
         JsonRpcGeneratorCollection generatorSettings = FluorineConfiguration.Instance.FluorineSettings.JSonSettings.JsonRpcGenerators;
         for (int i = 0; i < generatorSettings.Count; i++)
         {
             JsonRpcGenerator generatorSetting = generatorSettings[i];
             IJsonRpcProxyGenerator generator = ObjectFactory.CreateInstance(generatorSetting.Type) as IJsonRpcProxyGenerator;
             if (generator != null)
             {
                 _generators.Add(generatorSetting.Name, generator);
             }
             else
             {
                 if (log.IsErrorEnabled)
                     log.Error(string.Format("JsonRpcGenerator {0} was not found", generatorSetting.Name));
             }
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Creating JsonRpcProxyGenerator failed", ex);
     }
 }
コード例 #44
0
ファイル: ManageUnit.aspx.cs プロジェクト: eseawind/sac-pt
        public void InitLoad()
        {
            int page = Convert.ToInt32(Request["page"].ToString());
            int rows = Convert.ToInt32(Request["rows"].ToString());
            DataTable dt = bll.GetReportTableList(tableName, " 1=1", (page - 1) * rows + 1, page * rows);
            count = bll.GetReportCount(tableName);
            IList<Hashtable> list = new List<Hashtable>();
            int index = 0;
            foreach (DataRow item in dt.Rows)
            {
                Hashtable ht = new Hashtable();
                index++;
                ht.Add("KEY", index);
                ht.Add("ID", item["ID_KEY"].ToString());
                ht.Add("UID", item["T_UNITID"].ToString());
                ht.Add("UNAME", item["T_UNITDESC"].ToString());

                list.Add(ht);
            }
            object obj = new
            {
                total = count,
                rows = list
            };

            string result = JsonConvert.SerializeObject(obj);
            Response.Write(result);
            Response.End();
        }
コード例 #45
0
        /// <summary>
        /// "放入购物车"按钮单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonAdd2Cart_Click(object sender, System.EventArgs e)
        {
            if (Session["user_id"] == null)
                Page.Response.Redirect("Login.aspx?in=1");

            Cart cart = new Cart();
            Hashtable ht = new Hashtable();
            ArrayList selectedBooks = this.GetSelected();

            //如果用户没有选择,就单击该按钮,则给出警告
            if (selectedBooks.Count == 0)
            {
                Response.Write("<Script Language=JavaScript>alert('请选择图书!');</Script>");
                return;
            }

            //循环将选择的图书加入到购物篮中
            foreach (int bookId in selectedBooks)
            {
                ht.Clear();
                ht.Add("UserId", Session["user_id"].ToString());
                ht.Add("BookId", bookId);
                ht.Add("Amount", TextBoxAmount.Text.Trim());
                cart.Add(ht);
            }
            Response.Redirect("CartView.aspx");
        }
コード例 #46
0
        private void AddToView(string[] files, System.Collections.ArrayList al)
        {
            FileInfo     fi           = null;
            string       ParentPath   = string.Empty;
            string       ExePath      = string.Empty;
            Icon         icon         = null;
            int          index        = imglMenu.Images.Count;
            ListViewItem item         = null;
            int          j            = 0;
            string       groupKeyName = string.Empty;

            foreach (String srcFileName in files)
            {
                fi = new FileInfo(srcFileName);
                if (fi.Extension.ToLower() == ".lnk")
                {
                    ParentPath = ShortCutHelper.GetParentPathOfShortcut(srcFileName);
                    if (PubData.GV_CreateShowcutWithDel == true)
                    {
                        System.IO.File.Delete(srcFileName);
                    }
                }
                else
                {
                    ParentPath = srcFileName;
                }
                //if (ExistExePath(ParentPath) == false)
                //{
                SaveExePathToDB(al, ParentPath);

                ExePath      = ParentPath;
                fi           = new FileInfo(ExePath);
                groupKeyName = fi.Extension;
                if (!htListGroups.Contains(groupKeyName))
                {
                    ListViewGroup group = new ListViewGroup();
                    group.Header = groupKeyName;
                    group.Name   = groupKeyName;
                    lvStartMenu.Groups.Add(group);
                    htListGroups.Add(groupKeyName, group);
                }

                icon = FileIcon.ExtractAssociatedIcon(ExePath);

                imglMenu.Images.Add(icon);
                imglMenu.Images.SetKeyName(index + j, fi.Name);


                item = new ListViewItem();

                item.Text       = fi.Name;
                item.Group      = (ListViewGroup)htListGroups[groupKeyName];
                item.Tag        = fi.FullName;
                item.ImageIndex = index + j;
                lvStartMenu.Items.Add(item);
                j++;
                //}
            }
        }
コード例 #47
0
        public string Gravar(TRegistro_CadDesenhoPneu val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(9);
            hs.Add("@P_ID_DESENHO", val.Id_desenhostr);
            hs.Add("@P_DS_DESENHO", val.Ds_desenho);

            return(executarProc("IA_FRT_DESENHOPNEU", hs));
        }
コード例 #48
0
 public void DoPulse()
 {
     System.Collections.Hashtable hash =
         new System.Collections.Hashtable();
     hash.Add("amount", new Vector3(0.15f, 0.15f, 0f));
     hash.Add("time", 1f);
     iTween.PunchScale(model, hash);
 }
コード例 #49
0
        public string Excluir(TRegistro_PreVenda val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(2);
            hs.Add("@P_CD_EMPRESA", val.Cd_empresa);
            hs.Add("@P_ID_PREVENDA", val.id_prevenda);

            return(this.executarProc("EXCLUI_RES_PREVENDA", hs));
        }
コード例 #50
0
        public string Excluir(TRegistro_CentroResult_X_Historico val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(2);
            hs.Add("@P_CD_CENTRORESULT", val.Cd_centroresult);
            hs.Add("@P_CD_HISTORICO", val.Cd_historico);

            return(executarProc("EXCLUI_FIN_CENTRORESULT_X_HISTORICO", hs));
        }
コード例 #51
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string roomandsuite  = roomandsuiteasp.Value;
        string HiddenField01 = HiddenField1.Value;
        string HiddenField02 = HiddenField2.Value;
        string HiddenField03 = HiddenField3.Value;
        string HiddenField04 = HiddenField4.Value;
        string HiddenField05 = HiddenField5.Value;

        //Response.Write("Hello" + roomandsuite + HiddenField01 + HiddenField02 + HiddenField03 + HiddenField04 + HiddenField05);
        con = new SqlConnection("Server=.\\SQLEXPRESS; Database=journeybuzz; uid=sa; pwd=1");
        con.Open();
        string qr = ("insert into Hotel_Reservation_Form(Name,Contact_No,Check_in_date,Check_out_date,Room_Suite_Type,Number_of_room_suite,Number_of_persons,Number_of_children,Restaurant_facilities,Total_Cost) values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + roomandsuite + "','" + HiddenField01 + "','" + HiddenField02 + "','" + HiddenField03 + "','" + HiddenField04 + "','" + HiddenField05 + "')");

        cmd = new SqlCommand(qr, con);
        cmd.ExecuteNonQuery();
        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
        TextBox4.Text = "";
        con.Close();
        Double amount = Convert.ToDouble(HiddenField05);

        //String text = key.Value.ToString() + "|" + txnid.Value.ToString() + "|" + amount + "|" + "Women Tops" + "|" + TextBox1.Text + "|" + TextBox2.Text + "|" + "1" + "|" + "1" + "|" + "1" + "|" + "1" + "|" + "1" + "||||||" + salt.Value.ToString();
        //Response.Write(text);
        //byte[] message = Encoding.UTF8.GetBytes(text);

        UnicodeEncoding UE = new UnicodeEncoding();

        byte[]        hashValue;
        SHA512Managed hashString = new SHA512Managed();
        string        hex        = "";

        //hashValue = hashString.ComputeHash(message);
        //foreach (byte x in hashValue)
        //{
        //  hex += String.Format("{0:x2}", x);
        //}
        //hash.Value = hex;

        System.Collections.Hashtable data = new System.Collections.Hashtable(); // adding values in gash table for data post
        //data.Add("hash", hex.ToString());
        //data.Add("txnid", txnid.Value);
        //data.Add("key", key.Value);
        // string AmountForm = ;// eliminating trailing zeros

        data.Add("amount", amount);

        data.Add("surl", "http://localhost:1431/success.aspx");
        data.Add("furl", "http://localhost:1431/fail.aspx");

        data.Add("service_provider", "");


        string strForm = PreparePOSTForm("https://test.payu.in/_payment", data);

        Page.Controls.Add(new LiteralControl(strForm));
    }
コード例 #52
0
 void DoPulse()
 {
     iTween.Stop();
     System.Collections.Hashtable hash =
         new System.Collections.Hashtable();
     hash.Add("amount", new Vector3(2f, 2f, 2f));
     hash.Add("time", 0.25f);
     iTween.PunchScale(gameObject, hash);
 }
コード例 #53
0
        public string Excluir(TRegistro_LanPedido_X_Duplicata val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(3);
            hs.Add("@P_NR_PEDIDO", val.Nr_pedido);
            hs.Add("@P_CD_EMPRESA", val.Cd_empresa);
            hs.Add("@P_NR_LANCTO", val.Nr_lancto);

            return(this.executarProc("EXCLUI_FAT_PEDIDO_X_DUPLICATA", hs));
        }
コード例 #54
0
 public string Gravar(TRegistro_PistaBoliche val)
 {
     System.Collections.Hashtable hs = new System.Collections.Hashtable(3);
     hs.Add("@P_ID_PISTA", val.Id_Pista);
     hs.Add("@P_DS_PISTA", val.Ds_Pista);
     hs.Add("@P_ST_REGISTRO", val.st_registro);
     hs.Add("@P_TP_SERVICO", val.Tp_servico);
     return(this.executarProc("IA_RES_PISTABOLICHE", hs));
 }
コード例 #55
0
        public string Excluir(TRegistro_LanServico_X_Duplicata val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(3);
            hs.Add("@P_ID_OS", val.Id_os);
            hs.Add("@P_CD_EMPRESA", val.Cd_empresa);
            hs.Add("@P_NR_LANCTO", val.Nr_lancto);

            return(this.executarProc("EXCLUI_OSE_DUPLICATA", hs));
        }
コード例 #56
0
        public string DeletarLote_X_Caixa(TRegistro_Lote_X_Caixa val)
        {
            System.Collections.Hashtable hs = new System.Collections.Hashtable(3);
            hs.Add("@P_ID_LOTE", val.Id_lote);
            hs.Add("@P_CD_CONTAGER", val.Cd_contager);
            hs.Add("@P_CD_LANCTOCAIXA", val.Cd_lanctocaixa);

            return(executarProc("EXCLUI_COB_LOTE_X_CAIXA", hs));
        }
コード例 #57
0
        public void InitializeTest()
        {
            N_SolarRadiation.N_SR component = new N_SR();

            System.Collections.Hashtable args = new System.Collections.Hashtable();
            args.Add("ConfigFile", "../../../source/config.xml");
            args.Add("wtmpFolder", "../../../data/wtmp");
            component.Initialize(args);
        }
コード例 #58
0
ファイル: ExtensionAppLoader.cs プロジェクト: zjloscar/Dynamo
        private ExtensionAppLoader()
        {
            var assembly = typeof(IExtensionApplication).Assembly;

            mProtoInterface = assembly.GetName().Name;
            //Let's resolve ProtoInterface, with the assembly implementing IExtensionApplication i.e. DynamoServices
            mAssemblies.Add("ProtoInterface", assembly);
            Initialize();
        }
コード例 #59
0
        public void InitializeTest()
        {
            csvfileReader.WR component = new WR();

            System.Collections.Hashtable args = new System.Collections.Hashtable();
            args.Add("ConfigFile", "C:/research/code/HydroDesktopHG/Source/Plugins/HydroModeler/Components/wtmpReader/Source/config.xml");
            args.Add("DataFolder", "C:/research/code/HydroDesktopHG/Source/Plugins/HydroModeler/Components/wtmpReader/data");
            component.Initialize(args);
        }
コード例 #60
0
        public void TestCollections()
        {
            var c1 = new ArrayList();

            c1.Add("abc");
            c1.Add(1);
            c1.Add(new Test1());
            var yaml = serializer.Serialize(c1);

            Assert.AreEqual(
                BuildResult(
                    "!System.Collections.ArrayList",
                    "Capacity: 4",
                    "ICollection.Items: ",
                    "  - abc",
                    "  - 1",
                    "  - !YamlSerializerTest.Test1",
                    "    IntArrayField: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]",
                    "    PublicField: 0",
                    "    IntArrayFieldBinary: |+2",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
                    "      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
                    "    ReadOnlyClassProp: ",
                    "      Capacity: 0",
                    "    ClassPropByAssign: ",
                    "      Capacity: 0",
                    "    PublicProp: 0",
                    "    ClassPropByContent: ",
                    "      Capacity: 0"
                    ),
                yaml
                );
            Assert.AreEqual(yaml, serializer.Serialize(serializer.Deserialize(yaml)[0]));

            var c2 = new System.Collections.Hashtable();

            c2.Add(10, 5);
            c2.Add("abc", 123);
            c2.Add(TestEnum.あいう, 5);
            yaml = serializer.Serialize(c2);
            Assert.AreEqual(
                BuildResult(
                    "!System.Collections.Hashtable",
                    "IDictionary.Entries: ",
                    "  10: 5",
                    "  !YamlSerializerTest.TestEnum あいう: 5",
                    "  abc: 123"
                    ),
                yaml);
            Assert.AreEqual(yaml, serializer.Serialize(serializer.Deserialize(yaml)[0]));
        }